From 36678c0ae8eb65bd6c678fc7860b78de7fb0121b Mon Sep 17 00:00:00 2001 From: glx Date: Thu, 28 Feb 2008 00:17:49 +0000 Subject: (svn r12304) -Codechange: use IsValidTile() where it should be used --- src/command.cpp | 4 ++-- 1 file 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; } -- cgit v1.2.3-70-g09d2