summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-11-21 18:38:45 +0000
committerfrosch <frosch@openttd.org>2010-11-21 18:38:45 +0000
commit612516ff7631f427099c9850941202f2ef33e9ac (patch)
tree77d70b921f516acc12b5e12066fc05ead6c5ee77 /src/object_cmd.cpp
parent0fff26db9725b1c0ea414bb246e842375c5a3e31 (diff)
downloadopenttd-612516ff7631f427099c9850941202f2ef33e9ac.tar.xz
(svn r21290) -Codechange: Add HasTileWaterGround() to deduplicate some tests.
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index a3af4eb59..eab4ac075 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -187,7 +187,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
bool allow_water = (spec->flags & (OBJECT_FLAG_BUILT_ON_WATER | OBJECT_FLAG_NOT_ON_LAND)) != 0;
bool allow_ground = (spec->flags & OBJECT_FLAG_NOT_ON_LAND) == 0;
TILE_AREA_LOOP(t, ta) {
- if (HasTileWaterClass(t) && IsTileOnWater(t) && !IsCoastTile(t)) {
+ if (HasTileWaterGround(t)) {
if (!allow_water) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
if (!IsWaterTile(t)) {
/* Normal water tiles don't have to be cleared. For all other tile types clear