diff options
author | rubidium <rubidium@openttd.org> | 2007-10-19 22:46:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-19 22:46:55 +0000 |
commit | 95f2181a1dbd2ac1276bf3e044d6d9161b96ed50 (patch) | |
tree | 94325422edf35b6645a697ffa3bfd15ed090bf01 /src/water_cmd.cpp | |
parent | 9371ac13078df51aa920ecaa99485b0b4081513a (diff) | |
download | openttd-95f2181a1dbd2ac1276bf3e044d6d9161b96ed50.tar.xz |
(svn r11303) -Fix: EnsureNoVehicle and EnsureNoVehicleOnGround were both used to check whether there was no vehicle on the ground, except that the former didn't take care of aircraft shadows. So now we only use EnsureNoVehicleOnGround.
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index d58003fab..edaf1660a 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -105,11 +105,11 @@ static CommandCost RemoveShipDepot(TileIndex tile, uint32 flags) if (!IsShipDepot(tile)) return CMD_ERROR; if (!CheckTileOwnership(tile)) return CMD_ERROR; - if (!EnsureNoVehicle(tile)) return CMD_ERROR; + if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR; tile2 = GetOtherShipDepotTile(tile); - if (!EnsureNoVehicle(tile2)) return CMD_ERROR; + if (!EnsureNoVehicleOnGround(tile2)) return CMD_ERROR; if (flags & DC_EXEC) { /* Kill the depot, which is registered at the northernmost tile. Use that one */ @@ -172,7 +172,7 @@ static CommandCost RemoveShiplift(TileIndex tile, uint32 flags) if (!CheckTileOwnership(tile) && GetTileOwner(tile) != OWNER_NONE) return CMD_ERROR; /* make sure no vehicle is on the tile. */ - if (!EnsureNoVehicle(tile) || !EnsureNoVehicle(tile + delta) || !EnsureNoVehicle(tile - delta)) + if (!EnsureNoVehicleOnGround(tile) || !EnsureNoVehicleOnGround(tile + delta) || !EnsureNoVehicleOnGround(tile - delta)) return CMD_ERROR; if (flags & DC_EXEC) { @@ -303,7 +303,7 @@ static CommandCost ClearTile_Water(TileIndex tile, byte flags) } /* Make sure no vehicle is on the tile */ - if (!EnsureNoVehicle(tile)) return CMD_ERROR; + if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR; if (GetTileOwner(tile) != OWNER_WATER && GetTileOwner(tile) != OWNER_NONE && !CheckTileOwnership(tile)) return CMD_ERROR; @@ -314,7 +314,7 @@ static CommandCost ClearTile_Water(TileIndex tile, byte flags) Slope slope = GetTileSlope(tile, NULL); /* Make sure no vehicle is on the tile */ - if (!EnsureNoVehicle(tile)) return CMD_ERROR; + if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR; if (flags & DC_EXEC) DoClearSquare(tile); if (slope == SLOPE_N || slope == SLOPE_E || slope == SLOPE_S || slope == SLOPE_W) { |