summaryrefslogtreecommitdiff
path: root/src/disaster_vehicle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/disaster_vehicle.cpp')
-rw-r--r--src/disaster_vehicle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/disaster_vehicle.cpp b/src/disaster_vehicle.cpp
index 668a1caea..d339e898b 100644
--- a/src/disaster_vehicle.cpp
+++ b/src/disaster_vehicle.cpp
@@ -326,7 +326,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v)
return true;
}
if (++v->age < 6) {
- v->dest_tile = RandomTile();
+ v->dest_tile = TopTile(RandomTile());
return true;
}
v->current_order.SetDestination(1);
@@ -573,12 +573,12 @@ static bool DisasterTick_Big_Ufo(DisasterVehicle *v)
}
if (++v->age < 6) {
- v->dest_tile = RandomTile();
+ v->dest_tile = TopTile(RandomTile());
return true;
}
v->current_order.SetDestination(1);
- TileIndex tile_org = RandomTile();
+ TileIndex tile_org = TopTile(RandomTile());
TileIndex tile = tile_org;
do {
if (IsPlainRailTile(tile) &&
@@ -959,7 +959,7 @@ void ReleaseDisastersTargetingVehicle(VehicleID vehicle)
if (v->current_order.GetDestination() != 0 && v->dest_tile == vehicle) {
/* Revert to target-searching */
v->current_order.SetDestination(0);
- v->dest_tile = RandomTile();
+ v->dest_tile = TopTile(RandomTile());
GetAircraftFlightLevelBounds(v, &v->z_pos, nullptr);
v->age = 0;
}