summaryrefslogtreecommitdiff
path: root/src/disaster_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-02-25 21:29:50 +0000
committerfrosch <frosch@openttd.org>2009-02-25 21:29:50 +0000
commit8ebe68b01b4d033bde4b8082461891959d8fc4a2 (patch)
treeb564a00f660cd32d8c8f6fbeca4fd2642c760312 /src/disaster_cmd.cpp
parent751a9bdf0a84666d37a05d7e2c92dfbc135a134a (diff)
downloadopenttd-8ebe68b01b4d033bde4b8082461891959d8fc4a2.tar.xz
(svn r15583) -Fix: Do not use TILE_MASK when you do not want to wrap around them map.
Diffstat (limited to 'src/disaster_cmd.cpp')
-rw-r--r--src/disaster_cmd.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp
index 5205aa076..8ef01cf95 100644
--- a/src/disaster_cmd.cpp
+++ b/src/disaster_cmd.cpp
@@ -682,10 +682,12 @@ static void DisasterTick_Big_Ufo_Destroyer(Vehicle *v)
EV_EXPLOSION_SMALL);
}
- BEGIN_TILE_LOOP(tile, 6, 6, v->tile - TileDiffXY(3, 3))
- tile = TILE_MASK(tile);
- DisasterClearSquare(tile);
- END_TILE_LOOP(tile, 6, 6, v->tile - TileDiffXY(3, 3))
+ for (int dy = -3; dy < 3; dy++) {
+ for (int dx = -3; dx < 3; dx++) {
+ TileIndex tile = TileAddWrap(v->tile, dx, dy);
+ if (tile != INVALID_TILE) DisasterClearSquare(tile);
+ }
+ }
}
}