summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-02-28 00:17:49 +0000
committerglx <glx@openttd.org>2008-02-28 00:17:49 +0000
commit86a4d377b1f0a2cdc540ce8f029151d799a35023 (patch)
tree428d6f1425c2e037192d59a06318bfa7b244f29f
parent35195bb2bc47a92c8fd6060bdc7de3a8444f3bb4 (diff)
downloadopenttd-86a4d377b1f0a2cdc540ce8f029151d799a35023.tar.xz
(svn r12304) -Codechange: use IsValidTile() where it should be used
-rw-r--r--src/command.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command.cpp b/src/command.cpp
index b37222293..bb519cbd3 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -399,7 +399,7 @@ CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32
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 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
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;
}