Mercurial > hg > openttd
changeset 18491:b29b61d08720 draft
(svn r23335) -Change: Make determination of vehicle weight when loaded consistent between road and rail vehicle purchase info.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 26 Nov 2011 14:52:33 +0000 |
parents | 66f5e8825c2f |
children | 827e51e4c9b8 |
files | src/build_vehicle_gui.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -548,7 +548,7 @@ /* Wagon weight - (including cargo) */ uint weight = e->GetDisplayWeight(); SetDParam(0, weight); - uint cargo_weight = (e->CanCarryCargo() ? CargoSpec::Get(e->GetDefaultCargoType())->weight * e->GetDisplayDefaultCapacity() >> 4 : 0); + uint cargo_weight = (e->CanCarryCargo() ? CargoSpec::Get(e->GetDefaultCargoType())->weight * GetTotalCapacityOfArticulatedParts(engine_number) / 16 : 0); SetDParam(1, cargo_weight + weight); DrawString(left, right, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT); y += FONT_HEIGHT_NORMAL;