summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-15 22:21:50 +0000
committerrubidium <rubidium@openttd.org>2010-01-15 22:21:50 +0000
commit879668811c88f153e4f9e867146e7dd813377bc6 (patch)
treeedda138a3a9b2044491df7027876dc519390b947 /src
parent31d1e9c051f6170282f027fe8b040e9ea6f3f143 (diff)
downloadopenttd-879668811c88f153e4f9e867146e7dd813377bc6.tar.xz
(svn r18818) -Fix [FS#3526] (r18766): some train acceleration type conversions were missed
Diffstat (limited to 'src')
-rw-r--r--src/build_vehicle_gui.cpp2
-rw-r--r--src/engine_gui.cpp2
-rw-r--r--src/vehicle_gui.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 07b763de2..b98792e45 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -479,7 +479,7 @@ static int DrawRailEnginePurchaseInfo(int left, int right, int y, EngineID engin
y += FONT_HEIGHT_NORMAL;
/* Max tractive effort - not applicable if old acceleration or maglev */
- if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && rvi->railtype != RAILTYPE_MAGLEV) {
+ if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(rvi->railtype)->acceleration_type != 2) {
SetDParam(0, e->GetDisplayMaxTractiveEffort());
DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE);
y += FONT_HEIGHT_NORMAL;
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index 9df8f8189..b142c5cc6 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -161,7 +161,7 @@ static StringID GetTrainEngineInfoString(const Engine *e)
} else {
SetDParam(5, CT_INVALID);
}
- return (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && e->u.rail.railtype != RAILTYPE_MAGLEV) ? STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE : STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER;
+ return (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(e->u.rail.railtype)->acceleration_type != 2) ? STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE : STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER;
}
static StringID GetAircraftEngineInfoString(const Engine *e)
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index c0a0011e5..75d5a56b3 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1532,7 +1532,7 @@ struct VehicleDetailsWindow : Window {
SetDParam(1, Train::From(v)->tcache.cached_power);
SetDParam(0, Train::From(v)->tcache.cached_weight);
SetDParam(3, Train::From(v)->tcache.cached_max_te / 1000);
- DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && Train::From(v)->railtype != RAILTYPE_MAGLEV) ?
+ DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(Train::From(v)->railtype)->acceleration_type != 2) ?
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE : STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED);
break;