summaryrefslogtreecommitdiff
path: root/src/engine_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-01-30 11:53:35 +0000
committerbelugas <belugas@openttd.org>2007-01-30 11:53:35 +0000
commite8af755d7fc3b405f64b39cc4216b7fd4a7e9d23 (patch)
treed001f734f6111d6fe12abd4a122d09903325335c /src/engine_gui.cpp
parent5a9873c3bdb1fd8081f684036e7b82dbbe330fba (diff)
downloadopenttd-e8af755d7fc3b405f64b39cc4216b7fd4a7e9d23.tar.xz
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before. -Cleanup: Remove some extraneous parenthesis.
Diffstat (limited to 'src/engine_gui.cpp')
-rw-r--r--src/engine_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index 2f8307313..6b15c6541 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -122,7 +122,7 @@ void ShowEnginePreviewWindow(EngineID engine)
static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
{
const RailVehicleInfo *rvi = RailVehInfo(engine);
- uint multihead = (rvi->flags & RVI_MULTIHEAD) ? 1 : 0;
+ uint multihead = (rvi->railveh_type == RAILVEH_MULTIHEAD) ? 1 : 0;
SetDParam(0, (_price.build_railvehicle >> 3) * rvi->base_cost >> 5);
SetDParam(2, rvi->max_speed);