(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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user