summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index b054968be..c086d0c61 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -120,7 +120,7 @@ int32 CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!CheckAllowRemoveRoad(tile, pieces, &edge_road)) return CMD_ERROR;
- if (!EnsureNoVehicle(tile)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
/* check if you're allowed to remove the street owned by a town
* removal allowance depends on difficulty setting */
@@ -281,7 +281,7 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if ((existing & pieces) == pieces) {
return_cmd_error(STR_1007_ALREADY_BUILT);
}
- if (!EnsureNoVehicle(tile)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
break;
case ROAD_TILE_CROSSING:
@@ -325,7 +325,7 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
default: goto do_clear;
}
- if (!EnsureNoVehicle(tile)) return CMD_ERROR;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
if (flags & DC_EXEC) {
YapfNotifyTrackLayoutChange(tile, FindFirstTrack(GetTrackBits(tile)));
@@ -383,7 +383,7 @@ int32 DoConvertStreetRail(TileIndex tile, RailType totype, bool exec)
if (!IsLevelCrossing(tile)) return CMD_ERROR;
/* not owned by me? */
- if (!CheckTileOwnership(tile) || !EnsureNoVehicle(tile)) return CMD_ERROR;
+ if (!CheckTileOwnership(tile) || !EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
if (GetRailType(tile) == totype) return CMD_ERROR;
@@ -902,7 +902,7 @@ static void TileLoop_Road(TileIndex tile)
if (t->road_build_months != 0 &&
(DistanceManhattan(t->xy, tile) < 8 || grp != 0) &&
GetRoadTileType(tile) == ROAD_TILE_NORMAL && (GetRoadBits(tile) == ROAD_X || GetRoadBits(tile) == ROAD_Y)) {
- if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicle(tile) && CHANCE16(1, 20)) {
+ if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicleOnGround(tile) && CHANCE16(1, 20)) {
StartRoadWorks(tile);
SndPlayTileFx(SND_21_JACKHAMMER, tile);