(svn r19154) -Fix: Invisible depots draw the track, so also draw the overlays.
This commit is contained in:
@@ -2182,7 +2182,9 @@ static void DrawTile_Track(TileInfo *ti)
|
|||||||
SpriteID ground = GetCustomRailSprite(rti, ti->tile, RTSG_GROUND);
|
SpriteID ground = GetCustomRailSprite(rti, ti->tile, RTSG_GROUND);
|
||||||
|
|
||||||
switch (GetRailDepotDirection(ti->tile)) {
|
switch (GetRailDepotDirection(ti->tile)) {
|
||||||
|
case DIAGDIR_NE: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
|
||||||
case DIAGDIR_SW: DrawGroundSprite(ground + RTO_X, PAL_NONE); break;
|
case DIAGDIR_SW: DrawGroundSprite(ground + RTO_X, PAL_NONE); break;
|
||||||
|
case DIAGDIR_NW: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
|
||||||
case DIAGDIR_SE: DrawGroundSprite(ground + RTO_Y, PAL_NONE); break;
|
case DIAGDIR_SE: DrawGroundSprite(ground + RTO_Y, PAL_NONE); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@@ -2191,7 +2193,9 @@ static void DrawTile_Track(TileInfo *ti)
|
|||||||
SpriteID overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY);
|
SpriteID overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY);
|
||||||
|
|
||||||
switch (GetRailDepotDirection(ti->tile)) {
|
switch (GetRailDepotDirection(ti->tile)) {
|
||||||
|
case DIAGDIR_NE: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
|
||||||
case DIAGDIR_SW: DrawGroundSprite(overlay + RTO_X, PALETTE_CRASH); break;
|
case DIAGDIR_SW: DrawGroundSprite(overlay + RTO_X, PALETTE_CRASH); break;
|
||||||
|
case DIAGDIR_NW: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
|
||||||
case DIAGDIR_SE: DrawGroundSprite(overlay + RTO_Y, PALETTE_CRASH); break;
|
case DIAGDIR_SE: DrawGroundSprite(overlay + RTO_Y, PALETTE_CRASH); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@@ -2203,7 +2207,9 @@ static void DrawTile_Track(TileInfo *ti)
|
|||||||
/* PBS debugging, draw reserved tracks darker */
|
/* PBS debugging, draw reserved tracks darker */
|
||||||
if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasDepotReservation(ti->tile)) {
|
if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasDepotReservation(ti->tile)) {
|
||||||
switch (GetRailDepotDirection(ti->tile)) {
|
switch (GetRailDepotDirection(ti->tile)) {
|
||||||
|
case DIAGDIR_NE: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
|
||||||
case DIAGDIR_SW: DrawGroundSprite(rti->base_sprites.single_x, PALETTE_CRASH); break;
|
case DIAGDIR_SW: DrawGroundSprite(rti->base_sprites.single_x, PALETTE_CRASH); break;
|
||||||
|
case DIAGDIR_NW: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
|
||||||
case DIAGDIR_SE: DrawGroundSprite(rti->base_sprites.single_y, PALETTE_CRASH); break;
|
case DIAGDIR_SE: DrawGroundSprite(rti->base_sprites.single_y, PALETTE_CRASH); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user