summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-11-26 14:52:33 +0000
committerfrosch <frosch@openttd.org>2011-11-26 14:52:33 +0000
commit2ba05f1601c0a041ed8f8c6fcc26b4ce2a8dfcf1 (patch)
treecba687ff5d3d3a95c04b2aa5b0700040d7a9cb86 /src
parent3e780a794b46e288b3b7d7ba3f3b670698561ceb (diff)
downloadopenttd-2ba05f1601c0a041ed8f8c6fcc26b4ce2a8dfcf1.tar.xz
(svn r23335) -Change: Make determination of vehicle weight when loaded consistent between road and rail vehicle purchase info.
Diffstat (limited to 'src')
-rw-r--r--src/build_vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index d4d78959b..d3446f058 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -548,7 +548,7 @@ static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine
/* 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;