Codechange: do not hide variables with other variables
This commit is contained in:
@@ -865,7 +865,7 @@ do_clear:;
|
||||
if (HasPowerOnRoad(rt, existing_rt)) {
|
||||
rt = existing_rt;
|
||||
} else if (HasPowerOnRoad(existing_rt, rt)) {
|
||||
CommandCost ret = Command<CMD_CONVERT_ROAD>::Do(flags, tile, tile, rt);
|
||||
ret = Command<CMD_CONVERT_ROAD>::Do(flags, tile, tile, rt);
|
||||
if (ret.Failed()) return ret;
|
||||
cost.AddCost(ret);
|
||||
} else {
|
||||
@@ -1715,7 +1715,7 @@ static void DrawTile_Road(TileInfo *ti)
|
||||
/* Draw rail/PBS overlay */
|
||||
bool draw_pbs = _game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasCrossingReservation(ti->tile);
|
||||
if (rti->UsesOverlay()) {
|
||||
PaletteID pal = draw_pbs ? PALETTE_CRASH : PAL_NONE;
|
||||
pal = draw_pbs ? PALETTE_CRASH : PAL_NONE;
|
||||
SpriteID rail = GetCustomRailSprite(rti, ti->tile, RTSG_CROSSING) + axis;
|
||||
DrawGroundSprite(rail, pal);
|
||||
|
||||
@@ -1757,7 +1757,7 @@ static void DrawTile_Road(TileInfo *ti)
|
||||
}
|
||||
} else if (draw_pbs || tram_rti != nullptr || road_rti->UsesOverlay()) {
|
||||
/* Add another rail overlay, unless there is only the base road sprite. */
|
||||
PaletteID pal = draw_pbs ? PALETTE_CRASH : PAL_NONE;
|
||||
pal = draw_pbs ? PALETTE_CRASH : PAL_NONE;
|
||||
SpriteID rail = GetCrossingRoadAxis(ti->tile) == AXIS_Y ? GetRailTypeInfo(GetRailType(ti->tile))->base_sprites.single_x : GetRailTypeInfo(GetRailType(ti->tile))->base_sprites.single_y;
|
||||
DrawGroundSprite(rail, pal);
|
||||
}
|
||||
|
Reference in New Issue
Block a user