diff options
author | glx <glx@openttd.org> | 2006-12-09 20:14:26 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2006-12-09 20:14:26 +0000 |
commit | 5f8f0e4e47bda12d75239977a7519ceae9518a75 (patch) | |
tree | 7a20cd6931699f03f8a67d2eaec323eb82bee2b7 | |
parent | af18700a00438f3690c038436fc585d45b937bec (diff) | |
download | openttd-5f8f0e4e47bda12d75239977a7519ceae9518a75.tar.xz |
(svn r7459) -Fix: make sure TrainConsistChanged() is called for the first vehicle of a chain after reffiting
because free wagons present in depot can have the same type as the one bought and refitted by autoreplace
-rw-r--r-- | train_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c index 9cc1ec111..0632532d7 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1892,7 +1892,7 @@ int32 CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) _returned_refit_capacity = num; /* Update the train's cached variables */ - if (flags & DC_EXEC) TrainConsistChanged(GetVehicle(p1)); + if (flags & DC_EXEC) TrainConsistChanged(GetFirstVehicleInChain(GetVehicle(p1))); return cost; } |