Codechange: do not hide variables with other variables

This commit is contained in:
rubidium42
2023-01-28 20:06:51 +01:00
committed by rubidium42
parent 1951af07c0
commit 6ba55e663e
30 changed files with 137 additions and 146 deletions

View File

@@ -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);
}