mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-07 23:10:04 +00:00
(svn r13476) -Fix: draw canal borders for locks and when directly next to a aquaduct entrace but under the aqueduct.
This commit is contained in:
parent
58d63ec726
commit
232a2a8e3c
@ -483,7 +483,12 @@ static bool IsWateredTile(TileIndex tile, Direction from)
|
||||
{
|
||||
switch (GetTileType(tile)) {
|
||||
case MP_WATER:
|
||||
if (!IsCoast(tile)) return true;
|
||||
switch (GetWaterTileType(tile)) {
|
||||
default: NOT_REACHED();
|
||||
case WATER_TILE_DEPOT: case WATER_TILE_CLEAR: return true;
|
||||
case WATER_TILE_LOCK: return DiagDirToAxis(GetLockDirection(tile)) == DiagDirToAxis(DirToDiagDir(from));
|
||||
|
||||
case WATER_TILE_COAST:
|
||||
switch (GetTileSlope(tile, NULL)) {
|
||||
case SLOPE_W: return (from == DIR_SE) || (from == DIR_E) || (from == DIR_NE);
|
||||
case SLOPE_S: return (from == DIR_NE) || (from == DIR_N) || (from == DIR_NW);
|
||||
@ -491,6 +496,7 @@ static bool IsWateredTile(TileIndex tile, Direction from)
|
||||
case SLOPE_N: return (from == DIR_SW) || (from == DIR_S) || (from == DIR_SE);
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
case MP_RAILWAY:
|
||||
if (GetRailGroundType(tile) == RAIL_GROUND_WATER) {
|
||||
@ -507,7 +513,7 @@ static bool IsWateredTile(TileIndex tile, Direction from)
|
||||
|
||||
case MP_STATION: return IsOilRig(tile) || (IsDock(tile) && GetTileSlope(tile, NULL) == SLOPE_FLAT) || IsBuoy(tile);
|
||||
case MP_INDUSTRY: return (GetIndustrySpec(GetIndustryType(tile))->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0;
|
||||
case MP_TUNNELBRIDGE: return GetTunnelBridgeTransportType(tile) == TRANSPORT_WATER;
|
||||
case MP_TUNNELBRIDGE: return GetTunnelBridgeTransportType(tile) == TRANSPORT_WATER && ReverseDiagDir(GetTunnelBridgeDirection(tile)) == DirToDiagDir(from);
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user