summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-04-08 15:40:44 +0000
committerbjarni <bjarni@openttd.org>2005-04-08 15:40:44 +0000
commit4a1d9a4775a217f343efcc53f179c23af93960fb (patch)
treeeb7553a8a41496e56c391ac76436acaa6b3d8741 /vehicle.c
parent1d64640ebd908bdb1df97e35c0dc1f6ed7bdadd4 (diff)
downloadopenttd-4a1d9a4775a217f343efcc53f179c23af93960fb.tar.xz
(svn r2167) -fix: [autoreplace] trains now get the default cargo type if the engine
replaced from did not have cargo capacity (instead of refitting to passengers)
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 165a4ac42..422d06920 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1428,7 +1428,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
const RailVehicleInfo *rvi = RailVehInfo(new_engine_type);
const RailVehicleInfo *rvi2 = RailVehInfo(old_engine_type);
- byte capacity = rvi->capacity;
+ byte capacity = rvi2->capacity;
Vehicle *first = GetFirstVehicleInChain(v);
//if (v->owner == _local_player) InvalidateWindowClasses(WC_TRAINS_LIST);