diff options
author | frosch <frosch@openttd.org> | 2010-11-21 18:38:45 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-11-21 18:38:45 +0000 |
commit | 612516ff7631f427099c9850941202f2ef33e9ac (patch) | |
tree | 77d70b921f516acc12b5e12066fc05ead6c5ee77 /src/waypoint_cmd.cpp | |
parent | 0fff26db9725b1c0ea414bb246e842375c5a3e31 (diff) | |
download | openttd-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.cpp | 2 |
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); |