(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.
authorrubidium
Tue, 24 Jun 2008 15:58:01 +0000
changeset 11067 df918e13ef3b
parent 11066 942b9b820006
child 11069 706083d7f44b
(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.
src/terraform_gui.cpp
--- a/src/terraform_gui.cpp	Tue Jun 24 13:49:13 2008 +0000
+++ b/src/terraform_gui.cpp	Tue Jun 24 15:58:01 2008 +0000
@@ -368,8 +368,6 @@
 
 		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 @@
 
 		if (sizex == 0 || sizey == 0) return;
 
+		SndPlayTileFx(SND_1F_SPLAT, tile);
+
 		if (mode != 0) {
 			/* Raise land */
 			h = 15; // XXX - max height