summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-05-09 09:56:09 +0000
committertron <tron@openttd.org>2006-05-09 09:56:09 +0000
commitc9defc0fea20dc900c0c6d3f8aac8984b024052f (patch)
tree559b2b4b3e046cf2cb59f9c2eacbb8ea4f57cbb5 /tunnelbridge_cmd.c
parente5bd292dabdf5bbf58e5ce83c13688bbe047a62a (diff)
downloadopenttd-c9defc0fea20dc900c0c6d3f8aac8984b024052f.tar.xz
(svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to EnsureNoVehicleOnGround() to make more clear what it does
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 3076cc236..bae9977f0 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -608,7 +608,7 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
int32 cost;
// check if we own the tile below the bridge..
- if (_current_player != OWNER_WATER && (!CheckTileOwnership(tile) || !EnsureNoVehicleZ(tile, TilePixelHeight(tile))))
+ if (_current_player != OWNER_WATER && (!CheckTileOwnership(tile) || !EnsureNoVehicleOnGround(tile)))
return CMD_ERROR;
if (GetTransportTypeUnderBridge(tile) == TRANSPORT_RAIL) {
@@ -626,7 +626,7 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
/* delete canal under bridge */
// check for vehicles under bridge
- if (!EnsureNoVehicleZ(tile, TilePixelHeight(tile))) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
if (flags & DC_EXEC) {
SetClearUnderBridge(tile);
@@ -752,7 +752,7 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
IsTransportUnderBridge(tile) &&
GetTransportTypeUnderBridge(tile) == TRANSPORT_RAIL) {
// only check for train under bridge
- if (!CheckTileOwnership(tile) || !EnsureNoVehicleZ(tile, TilePixelHeight(tile)))
+ if (!CheckTileOwnership(tile) || !EnsureNoVehicleOnGround(tile))
return CMD_ERROR;
if (GetRailType(tile) == totype) return CMD_ERROR;