(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.
This commit is contained in:
		| @@ -368,8 +368,6 @@ static void CommonRaiseLowerBigLand(TileIndex tile, int mode) | |||||||
|  |  | ||||||
| 		DoCommandP(tile, SLOPE_N, (uint32)mode, CcTerraform, CMD_TERRAFORM_LAND | CMD_MSG(msg)); | 		DoCommandP(tile, SLOPE_N, (uint32)mode, CcTerraform, CMD_TERRAFORM_LAND | CMD_MSG(msg)); | ||||||
| 	} else { | 	} else { | ||||||
| 		SndPlayTileFx(SND_1F_SPLAT, tile); |  | ||||||
|  |  | ||||||
| 		assert(_terraform_size != 0); | 		assert(_terraform_size != 0); | ||||||
| 		/* check out for map overflows */ | 		/* check out for map overflows */ | ||||||
| 		sizex = min(MapSizeX() - TileX(tile) - 1, _terraform_size); | 		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; | 		if (sizex == 0 || sizey == 0) return; | ||||||
|  |  | ||||||
|  | 		SndPlayTileFx(SND_1F_SPLAT, tile); | ||||||
|  |  | ||||||
| 		if (mode != 0) { | 		if (mode != 0) { | ||||||
| 			/* Raise land */ | 			/* Raise land */ | ||||||
| 			h = 15; // XXX - max height | 			h = 15; // XXX - max height | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 rubidium
					rubidium