summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2012-01-03 00:44:23 +0000
committeryexo <yexo@openttd.org>2012-01-03 00:44:23 +0000
commitb9e19cc6c15df0e66152d46df767b6370b89a9db (patch)
treedf8194ac0b80a1a964810de20b7bbf2bc10c584b /src/object_cmd.cpp
parent4027e58ba315c17a213c218e4d26e5c066372129 (diff)
downloadopenttd-b9e19cc6c15df0e66152d46df767b6370b89a9db.tar.xz
(svn r23723) -Codechange: speedup flood checks a bit
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index fa7ea68dc..117212e1f 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -697,8 +697,8 @@ void GenerateObjects()
assert(tile < MapSize());
break;
}
- tile = AddTileIndexDiffCWrap(tile, TileIndexDiffCByDiagDir(dir));
- if (tile == INVALID_TILE) break;
+ tile += TileOffsByDiagDir(dir);
+ if (!IsValidTile(tile)) break;
}
}
}