summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-16 08:20:37 +0000
committerrubidium <rubidium@openttd.org>2007-05-16 08:20:37 +0000
commitc32d38a2b76ff753dcf6522c2d0340344a1dda09 (patch)
treec74656dec562825ba7a36373170e128306d8d6ab
parent641d51a5ad5b18a94a0e00f48c6b8efb9dcfad26 (diff)
downloadopenttd-c32d38a2b76ff753dcf6522c2d0340344a1dda09.tar.xz
(svn r9855) -Fix: [FS#779] do not perform any commands on MP_VOID tiles.
-rw-r--r--src/command.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 0b20d9820..49029ee7e 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -339,7 +339,7 @@ int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
CommandProc *proc;
/* Do not even think about executing out-of-bounds tile-commands */
- if (tile >= MapSize()) {
+ if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
_cmd_text = NULL;
return CMD_ERROR;
}
@@ -417,7 +417,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()) {
+ if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
_cmd_text = NULL;
return false;
}