diff options
author | frosch <frosch@openttd.org> | 2010-11-21 18:39:12 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-11-21 18:39:12 +0000 |
commit | 55d604e60d1bcf9e6ee150bc0ab63805105bfe09 (patch) | |
tree | e0233b158cdb0438bc2c4f645526b7c6f8640066 | |
parent | 612516ff7631f427099c9850941202f2ef33e9ac (diff) | |
download | openttd-55d604e60d1bcf9e6ee150bc0ab63805105bfe09.tar.xz |
(svn r21291) -Fix: Treat objects on water like water in more cases.
-rw-r--r-- | src/station_cmd.cpp | 2 | ||||
-rw-r--r-- | src/town_cmd.cpp | 4 | ||||
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 06ad7d982..9936c6a8c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2386,7 +2386,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 direction = ReverseDiagDir(direction); /* Docks cannot be placed on rapids */ - if (IsWaterTile(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE); + if (HasTileWaterGround(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE); CommandCost ret = CheckIfAuthorityAllowsNewStation(tile, flags); if (ret.Failed()) return ret; diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index faaa3c3fa..ddf3f186b 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1123,7 +1123,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t TileIndex house_tile = TileAddByDiagDir(tile, target_dir); // position of a possible house /* Don't walk into water. */ - if (IsWaterTile(house_tile)) return; + if (HasTileWaterGround(house_tile)) return; if (!IsValidTile(house_tile)) return; @@ -1172,7 +1172,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t } /* Return if a water tile */ - if (IsWaterTile(tile)) return; + if (HasTileWaterGround(tile)) return; /* Make the roads look nicer */ rcmd = CleanUpRoadBits(tile, rcmd); diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 59484b03c..4f67d4323 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -525,7 +525,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, DiagDirection direction = GetInclinedSlopeDirection(start_tileh); if (direction == INVALID_DIAGDIR) return_cmd_error(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL); - if (IsWaterTile(start_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); + if (HasTileWaterGround(start_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); CommandCost ret = DoCommand(start_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; @@ -582,7 +582,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, /* if the command fails from here on we want the end tile to be highlighted */ _build_tunnel_endtile = end_tile; - if (IsWaterTile(end_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); + if (HasTileWaterGround(end_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); /* Clear the tile in any case */ ret = DoCommand(end_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); |