From 1323e946076deadad10465ed536a3a6e03e3a8db Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 16 Mar 2009 23:23:33 +0000 Subject: (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. --- src/disaster_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 98cfe8692..87002eb24 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -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; -- cgit v1.2.3-54-g00ecf