# HG changeset patch # User peter1138 # Date 1178306641 0 # Node ID 846986cf3a6ef7d8c6e28e161756400fcda218d8 # Parent ea55b60460153147ef692218d8886b45f719f49a (svn r9780) -Codechange: [NewGRF] Add support for variable vehicle weight for trains (callback 36, property 16) diff -r ea55b6046015 -r 846986cf3a6e src/train_cmd.cpp --- a/src/train_cmd.cpp Fri May 04 16:27:13 2007 +0000 +++ b/src/train_cmd.cpp Fri May 04 19:24:01 2007 +0000 @@ -114,7 +114,7 @@ /* 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))