(svn r15748) -Fix (r1722): the assumption that the number of tiles on the X side equals the number of tiles on the Y side does not hold anymore. As a result of this submarines could be created far outside of the map. Later in r15733 we would test whether that tile would be a water tile and we'd find out the tile isn't within the map.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 16 years ago
parent 7bbdd4f119
commit f044ef6564

@ -885,7 +885,7 @@ static void Disaster_Submarine_Init(DisasterSubType subtype)
int x = TileX(r) * TILE_SIZE + TILE_SIZE / 2;
if (HasBit(r, 31)) {
y = MapMaxX() * TILE_SIZE - TILE_SIZE / 2 - 1;
y = MapMaxY() * TILE_SIZE - TILE_SIZE / 2 - 1;
dir = DIR_NW;
} else {
y = TILE_SIZE / 2;

Loading…
Cancel
Save