(svn r12304) -Codechange: use IsValidTile() where it should be used
authorglx
Thu, 28 Feb 2008 00:17:49 +0000
changeset 8652 671ecccd18ad
parent 8651 037a1ae32547
child 8653 527a6273a0a8
(svn r12304) -Codechange: use IsValidTile() where it should be used
src/command.cpp
--- a/src/command.cpp	Thu Feb 28 00:10:08 2008 +0000
+++ b/src/command.cpp	Thu Feb 28 00:17:49 2008 +0000
@@ -399,7 +399,7 @@
 	CommandProc *proc;
 
 	/* Do not even think about executing out-of-bounds tile-commands */
-	if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
+	if (!IsValidTile(tile)) {
 		_cmd_text = NULL;
 		return CMD_ERROR;
 	}
@@ -499,7 +499,7 @@
 	int y = TileY(tile) * TILE_SIZE;
 
 	/* Do not even think about executing out-of-bounds tile-commands */
-	if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
+	if (!IsValidTile(tile)) {
 		_cmd_text = NULL;
 		return false;
 	}