--- a/src/water_cmd.cpp Sun Apr 06 14:12:19 2008 +0000
+++ b/src/water_cmd.cpp Sun Apr 06 23:07:42 2008 +0000
@@ -597,6 +597,9 @@
if (image < 4) image += water_base;
if (draw_ground) DrawGroundSprite(image, PAL_NONE);
+ /* End now if buildings are invisible */
+ if (IsInvisibilitySet(TO_BUILDINGS)) return;
+
for (; wdts->delta_x != 0x80; wdts++) {
AddSortableSpriteToDraw(wdts->image + base + ((wdts->image < 24) ? locks_base : 0), palette,
ti->x + wdts->delta_x, ti->y + wdts->delta_y,
@@ -1040,7 +1043,7 @@
if (IsTileType(dest, MP_WATER)) continue;
uint z_dest;
- Slope slope_dest = (Slope)(GetFoundationSlope(dest, &z_dest) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP);
+ Slope slope_dest = GetFoundationSlope(dest, &z_dest) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP;
if (z_dest > 0) continue;
if (!HasBit(_flood_from_dirs[slope_dest], ReverseDir(dir))) continue;
@@ -1050,7 +1053,7 @@
break;
case FLOOD_DRYUP: {
- Slope slope_here = (Slope)(GetFoundationSlope(tile, NULL) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP);
+ Slope slope_here = GetFoundationSlope(tile, NULL) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP;
uint check_dirs = _flood_from_dirs[slope_here];
uint dir;
FOR_EACH_SET_BIT(dir, check_dirs) {
@@ -1097,7 +1100,7 @@
uint dir;
FOR_EACH_SET_BIT(dir, check_dirs) {
TileIndex dest = TILE_ADD(tile, TileOffsByDir((Direction)dir));
- Slope slope_dest = (Slope)(GetTileSlope(dest, NULL) & ~SLOPE_STEEP);
+ Slope slope_dest = GetTileSlope(dest, NULL) & ~SLOPE_STEEP;
if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest)) {
MakeShore(tile);
break;