diff options
author | peter1138 <peter1138@openttd.org> | 2007-05-04 19:24:01 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-05-04 19:24:01 +0000 |
commit | e81906c62d0f706ec98e95b4ed9dd039009fe167 (patch) | |
tree | 3efa1a6a97a74fc9d93b022008aea3b36b3f493b /src | |
parent | aff49954bf116162d440c48e29bf35fb116d1dd6 (diff) | |
download | openttd-e81906c62d0f706ec98e95b4ed9dd039009fe167.tar.xz |
(svn r9780) -Codechange: [NewGRF] Add support for variable vehicle weight for trains (callback 36, property 16)
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index ef2f3178d..d07c7556f 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -114,7 +114,7 @@ static void TrainCargoChanged(Vehicle* v) /* Vehicle weight is not added for articulated parts. */ if (!IsArticulatedPart(u)) { /* vehicle weight is the sum of the weight of the vehicle and the weight of its cargo */ - vweight += RailVehInfo(u->engine_type)->weight; + vweight += GetVehicleProperty(u, 0x16, RailVehInfo(u->engine_type)->weight); /* powered wagons have extra weight added */ if (HASBIT(u->u.rail.flags, VRF_POWEREDWAGON)) |