(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.

This commit is contained in:
rubidium 2009-03-16 23:23:33 +00:00
parent 7bbdd4f119
commit f044ef6564
1 changed files with 1 additions and 1 deletions

View File

@ -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;