|
|
|
@ -1089,6 +1089,9 @@ FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
|
|
|
|
|
case MP_TREES:
|
|
|
|
|
return (GetTreeGround(tile) == TREE_GROUND_SHORE ? FLOOD_DRYUP : FLOOD_NONE);
|
|
|
|
|
|
|
|
|
|
case MP_VOID:
|
|
|
|
|
return FLOOD_ACTIVE;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return FLOOD_NONE;
|
|
|
|
|
}
|
|
|
|
@ -1240,7 +1243,7 @@ void TileLoop_Water(TileIndex tile)
|
|
|
|
|
Slope slope_here = GetFoundationSlope(tile) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP;
|
|
|
|
|
for (uint dir : SetBitIterator(_flood_from_dirs[slope_here])) {
|
|
|
|
|
TileIndex dest = tile + TileOffsByDir((Direction)dir);
|
|
|
|
|
if (!IsValidTile(dest)) continue;
|
|
|
|
|
if (dest >= Map::Size()) continue;
|
|
|
|
|
|
|
|
|
|
FloodingBehaviour dest_behaviour = GetFloodingBehaviour(dest);
|
|
|
|
|
if ((dest_behaviour == FLOOD_ACTIVE) || (dest_behaviour == FLOOD_PASSIVE)) return;
|
|
|
|
@ -1279,7 +1282,7 @@ void ConvertGroundTilesIntoWaterTiles()
|
|
|
|
|
for (uint dir : SetBitIterator(_flood_from_dirs[slope & ~SLOPE_STEEP])) {
|
|
|
|
|
TileIndex dest = TileAddByDir(tile, (Direction)dir);
|
|
|
|
|
Slope slope_dest = GetTileSlope(dest) & ~SLOPE_STEEP;
|
|
|
|
|
if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest)) {
|
|
|
|
|
if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest) || IsTileType(dest, MP_VOID)) {
|
|
|
|
|
MakeShore(tile);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|