mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Avoid unnecessary tile slope check in GetTileTrackStatus_Water
This commit is contained in:
parent
fead409888
commit
5f94f1e27e
@ -1451,7 +1451,7 @@ static TrackStatus GetTileTrackStatus_Water(TileIndex tile, TransportType mode,
|
|||||||
if (mode != TRANSPORT_WATER) return 0;
|
if (mode != TRANSPORT_WATER) return 0;
|
||||||
|
|
||||||
switch (GetWaterTileType(tile)) {
|
switch (GetWaterTileType(tile)) {
|
||||||
case WATER_TILE_CLEAR: ts = IsTileFlat(tile) ? TRACK_BIT_ALL : TRACK_BIT_NONE; break;
|
case WATER_TILE_CLEAR: ts = ((GetWaterClass(tile) < WATER_CLASS_RIVER) || IsTileFlat(tile)) ? TRACK_BIT_ALL : TRACK_BIT_NONE; break;
|
||||||
case WATER_TILE_COAST: ts = coast_tracks[GetTileSlope(tile) & 0xF]; break;
|
case WATER_TILE_COAST: ts = coast_tracks[GetTileSlope(tile) & 0xF]; break;
|
||||||
case WATER_TILE_LOCK: ts = DiagDirToDiagTrackBits(GetLockDirection(tile)); break;
|
case WATER_TILE_LOCK: ts = DiagDirToDiagTrackBits(GetLockDirection(tile)); break;
|
||||||
case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;
|
case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;
|
||||||
|
Loading…
Reference in New Issue
Block a user