summaryrefslogtreecommitdiff
path: root/src/waypoint_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/waypoint_cmd.cpp
parent0fff26db9725b1c0ea414bb246e842375c5a3e31 (diff)
downloadopenttd-612516ff7631f427099c9850941202f2ef33e9ac.tar.xz
(svn r21290) -Codechange: Add HasTileWaterGround() to deduplicate some tests.
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index c7095673a..510119c7e 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -282,7 +282,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
*/
CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
- if (!HasTileWaterClass(tile) || !IsTileOnWater(tile) || tile == 0) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
+ if (tile == 0 || !HasTileWaterGround(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
if (GetTileSlope(tile, NULL) != SLOPE_FLAT) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);