From e81906c62d0f706ec98e95b4ed9dd039009fe167 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 4 May 2007 19:24:01 +0000 Subject: (svn r9780) -Codechange: [NewGRF] Add support for variable vehicle weight for trains (callback 36, property 16) --- src/train_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3-54-g00ecf