forked from mirror/OpenTTD
(svn r19788) -Codechange: make FOR_EACH_SET_BIT not change the value of the passed bit variable, i.e. allow expressions as parameter
This commit is contained in:
@@ -1008,9 +1008,8 @@ void TileLoop_Water(TileIndex tile)
|
||||
|
||||
case FLOOD_DRYUP: {
|
||||
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) {
|
||||
FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope_here]) {
|
||||
TileIndex dest = AddTileIndexDiffCWrap(tile, TileIndexDiffCByDir((Direction)dir));
|
||||
if (dest == INVALID_TILE) continue;
|
||||
|
||||
@@ -1048,9 +1047,8 @@ void ConvertGroundTilesIntoWaterTiles()
|
||||
break;
|
||||
|
||||
default:
|
||||
uint check_dirs = _flood_from_dirs[slope & ~SLOPE_STEEP];
|
||||
uint dir;
|
||||
FOR_EACH_SET_BIT(dir, check_dirs) {
|
||||
FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope & ~SLOPE_STEEP]) {
|
||||
TileIndex dest = TILE_ADD(tile, TileOffsByDir((Direction)dir));
|
||||
Slope slope_dest = GetTileSlope(dest, NULL) & ~SLOPE_STEEP;
|
||||
if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest)) {
|
||||
|
Reference in New Issue
Block a user