summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-10-19 22:46:55 +0000
committerrubidium <rubidium@openttd.org>2007-10-19 22:46:55 +0000
commit95f2181a1dbd2ac1276bf3e044d6d9161b96ed50 (patch)
tree94325422edf35b6645a697ffa3bfd15ed090bf01 /src/station_cmd.cpp
parent9371ac13078df51aa920ecaa99485b0b4081513a (diff)
downloadopenttd-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/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 5e83674b4..a1284248c 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1128,7 +1128,7 @@ CommandCost CmdRemoveFromRailroadStation(TileIndex tile, uint32 flags, uint32 p1
/* Check ownership of station */
Station *st = GetStationByTile(tile2);
- if (_current_player != OWNER_WATER && (!CheckOwnership(st->owner) || !EnsureNoVehicle(tile2))) {
+ if (_current_player != OWNER_WATER && (!CheckOwnership(st->owner) || !EnsureNoVehicleOnGround(tile2))) {
continue;
}
@@ -1191,7 +1191,7 @@ static CommandCost RemoveRailroadStation(Station *st, TileIndex tile, uint32 fla
do {
// for nonuniform stations, only remove tiles that are actually train station tiles
if (st->TileBelongsToRailStation(tile)) {
- if (!EnsureNoVehicle(tile))
+ if (!EnsureNoVehicleOnGround(tile))
return CMD_ERROR;
cost.AddCost(_price.remove_rail_station);
if (flags & DC_EXEC) {
@@ -1425,7 +1425,7 @@ static CommandCost RemoveRoadStop(Station *st, uint32 flags, TileIndex tile)
assert(cur_stop != NULL);
- if (!EnsureNoVehicle(tile)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
if (flags & DC_EXEC) {
if (*primary_stop == cur_stop) {
@@ -1832,7 +1832,7 @@ static CommandCost RemoveBuoy(Station *st, uint32 flags)
TileIndex tile = st->dock_tile;
if (CheckShipsOnBuoy(st)) return_cmd_error(STR_BUOY_IS_IN_USE);
- if (!EnsureNoVehicle(tile)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
if (flags & DC_EXEC) {
st->dock_tile = 0;
@@ -1980,8 +1980,8 @@ static CommandCost RemoveDock(Station *st, uint32 flags)
TileIndex tile1 = st->dock_tile;
TileIndex tile2 = tile1 + TileOffsByDiagDir(GetDockDirection(tile1));
- if (!EnsureNoVehicle(tile1)) return CMD_ERROR;
- if (!EnsureNoVehicle(tile2)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile1)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile2)) return CMD_ERROR;
if (flags & DC_EXEC) {
DoClearSquare(tile1);