diff options
author | peter1138 <peter1138@openttd.org> | 2006-12-10 19:00:06 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-12-10 19:00:06 +0000 |
commit | 8e26cfb157420959fe3cde0c511d81089335fb74 (patch) | |
tree | 28e500a71ec9ff4ad854a8205f70f73fe5b95f60 /train_gui.c | |
parent | ea518f8d9663b757bdc444aa6255a1c35c22ff0e (diff) | |
download | openttd-8e26cfb157420959fe3cde0c511d81089335fb74.tar.xz |
(svn r7473) -Fix (r7269): Pass a cargo type to determine the freight weight
multiplier instead of a vehicle. Fixes incorrect display of total
train capacity.
Diffstat (limited to 'train_gui.c')
-rw-r--r-- | train_gui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/train_gui.c b/train_gui.c index cc2f4609b..f3e461bbc 100644 --- a/train_gui.c +++ b/train_gui.c @@ -844,7 +844,7 @@ static void TrainDetailsCargoTab(const Vehicle *v, int x, int y) SetDParam(1, num); SetDParam(2, v->cargo_source); SetDParam(3, _patches.freight_trains); - str = FreightWagonMult(v) > 1 ? STR_FROM_MULT : STR_8813_FROM; + str = FreightWagonMult(v->cargo_type) > 1 ? STR_FROM_MULT : STR_8813_FROM; } DrawString(x, y, str, 0); } @@ -870,7 +870,7 @@ static void TrainDetailsCapacityTab(const Vehicle *v, int x, int y) SetDParam(0, v->cargo_type); SetDParam(1, v->cargo_cap); SetDParam(2, _patches.freight_trains); - DrawString(x, y, FreightWagonMult(v) > 1 ? STR_CAPACITY_MULT : STR_013F_CAPACITY, 0); + DrawString(x, y, FreightWagonMult(v->cargo_type) > 1 ? STR_CAPACITY_MULT : STR_013F_CAPACITY, 0); } } @@ -1008,7 +1008,7 @@ static void DrawTrainDetailsWindow(Window *w) SetDParam(2, i); // {SHORTCARGO} #1 SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2 SetDParam(4, _patches.freight_trains); - DrawString(x, y + 2, FreightWagonMult(v) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, 0); + DrawString(x, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, 0); } } } |