summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-03-15 21:49:37 +0000
committeryexo <yexo@openttd.org>2009-03-15 21:49:37 +0000
commit42e0a5d2cadb7dc97a8943799b09aca08f2ef165 (patch)
treeb441e03d973e598a6d3aa945be441fe5a81e6595
parentdeab21114e03a27e06a4c17067eea73aea23d460 (diff)
downloadopenttd-42e0a5d2cadb7dc97a8943799b09aca08f2ef165.tar.xz
(svn r15733) -Fix: Enabling freeform edges could cause submarines to get stuck on land tiles.
-rw-r--r--src/disaster_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp
index 8f03584b3..98cfe8692 100644
--- a/src/disaster_cmd.cpp
+++ b/src/disaster_cmd.cpp
@@ -889,8 +889,10 @@ static void Disaster_Submarine_Init(DisasterSubType subtype)
dir = DIR_NW;
} else {
y = TILE_SIZE / 2;
+ if (_settings_game.construction.freeform_edges) y += TILE_SIZE;
dir = DIR_SE;
}
+ if (!IsWaterTile(TileVirtXY(x, y))) return;
Vehicle *v = new DisasterVehicle();
InitializeDisasterVehicle(v, x, y, 0, dir, subtype);