From e8af755d7fc3b405f64b39cc4216b7fd4a7e9d23 Mon Sep 17 00:00:00 2001 From: belugas Date: Tue, 30 Jan 2007 11:53:35 +0000 Subject: (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. --- src/engine_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine_gui.cpp') 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); -- cgit v1.2.3-54-g00ecf