summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-02-04 18:25:07 +0000
committerbjarni <bjarni@openttd.org>2006-02-04 18:25:07 +0000
commitc77c99b3c78add8f38d48e623f750faa7820e28c (patch)
tree20068dc0fce73768c5bdcbbc3cb9668c47d94d51 /train_cmd.c
parenta88ed0583bc7771329e9e2d51b77ad8766625708 (diff)
downloadopenttd-c77c99b3c78add8f38d48e623f750faa7820e28c.tar.xz
(svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagons
currently ALL available wagons are displayed in the right menu in the replace window however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 01e6554f5..ce67e3bb3 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -584,6 +584,9 @@ static int32 CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 flags)
TrainConsistChanged(GetFirstVehicleInChain(v));
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
+ if (IsLocalPlayer()) {
+ InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); // updates the replace Train window
+ }
}
}