summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-06-24 15:58:01 +0000
committerrubidium <rubidium@openttd.org>2008-06-24 15:58:01 +0000
commitfdbb1f475bc1fcfc18e6cae16d2894fcb1259c08 (patch)
tree666145946c055f45a3d857735a75958aee539342
parentc3009c34eeaae84afe2967649e953ac82d9093d9 (diff)
downloadopenttd-fdbb1f475bc1fcfc18e6cae16d2894fcb1259c08.tar.xz
(svn r13624) -Fix [FS#2106]: crash when one tries to raise the nothern corner of MP_VOID tiles (i.e. the southern corner of the tiles on the southern map edge) in the scenario editor.
-rw-r--r--src/terraform_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index a6c492961..8e84c0165 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -368,8 +368,6 @@ static void CommonRaiseLowerBigLand(TileIndex tile, int mode)
DoCommandP(tile, SLOPE_N, (uint32)mode, CcTerraform, CMD_TERRAFORM_LAND | CMD_MSG(msg));
} else {
- SndPlayTileFx(SND_1F_SPLAT, tile);
-
assert(_terraform_size != 0);
/* check out for map overflows */
sizex = min(MapSizeX() - TileX(tile) - 1, _terraform_size);
@@ -377,6 +375,8 @@ static void CommonRaiseLowerBigLand(TileIndex tile, int mode)
if (sizex == 0 || sizey == 0) return;
+ SndPlayTileFx(SND_1F_SPLAT, tile);
+
if (mode != 0) {
/* Raise land */
h = 15; // XXX - max height