equal
deleted
inserted
replaced
112 uint32 vweight = GetCargo(u->cargo_type)->weight * u->cargo_count * FreightWagonMult(u->cargo_type) / 16; |
112 uint32 vweight = GetCargo(u->cargo_type)->weight * u->cargo_count * FreightWagonMult(u->cargo_type) / 16; |
113 |
113 |
114 /* Vehicle weight is not added for articulated parts. */ |
114 /* Vehicle weight is not added for articulated parts. */ |
115 if (!IsArticulatedPart(u)) { |
115 if (!IsArticulatedPart(u)) { |
116 /* vehicle weight is the sum of the weight of the vehicle and the weight of its cargo */ |
116 /* vehicle weight is the sum of the weight of the vehicle and the weight of its cargo */ |
117 vweight += RailVehInfo(u->engine_type)->weight; |
117 vweight += GetVehicleProperty(u, 0x16, RailVehInfo(u->engine_type)->weight); |
118 |
118 |
119 /* powered wagons have extra weight added */ |
119 /* powered wagons have extra weight added */ |
120 if (HASBIT(u->u.rail.flags, VRF_POWEREDWAGON)) |
120 if (HASBIT(u->u.rail.flags, VRF_POWEREDWAGON)) |
121 vweight += RailVehInfo(u->u.rail.first_engine)->pow_wag_weight; |
121 vweight += RailVehInfo(u->u.rail.first_engine)->pow_wag_weight; |
122 } |
122 } |