Merge branch 'master' into jgrpp
# Conflicts: # src/clear_cmd.cpp # src/main_gui.cpp # src/saveload/newgrf_sl.cpp # src/water_cmd.cpp
This commit is contained in:
@@ -1164,6 +1164,9 @@ FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
|
||||
case MP_OBJECT:
|
||||
return (GetObjectGroundType(tile) == OBJECT_GROUND_SHORE ? FLOOD_DRYUP : ((GetWaterClass(tile) == WATER_CLASS_SEA) ? FLOOD_ACTIVE : FLOOD_NONE));
|
||||
|
||||
case MP_VOID:
|
||||
return FLOOD_ACTIVE;
|
||||
|
||||
default:
|
||||
return FLOOD_NONE;
|
||||
}
|
||||
@@ -1353,7 +1356,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 >= MapSize()) continue;
|
||||
|
||||
FloodingBehaviour dest_behaviour = GetFloodingBehaviour(dest);
|
||||
if ((dest_behaviour == FLOOD_ACTIVE) || (dest_behaviour == FLOOD_PASSIVE)) return;
|
||||
@@ -1392,7 +1395,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user