mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r15750) -Fix: The big ufo sometimes landed just outside the map. Instead of landing, just disappear (fly away) in those cases.
This commit is contained in:
parent
72dc128915
commit
93be9a1c90
|
@ -481,6 +481,12 @@ static void DisasterTick_Big_Ufo(Vehicle *v)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!IsValidTile(v->dest_tile)) {
|
||||
/* Make sure we don't land outside the map. */
|
||||
delete v;
|
||||
return;
|
||||
}
|
||||
|
||||
byte z = GetSlopeZ(v->x_pos, v->y_pos);
|
||||
if (z < v->z_pos) {
|
||||
SetDisasterVehiclePos(v, v->x_pos, v->y_pos, v->z_pos - 1);
|
||||
|
|
Loading…
Reference in New Issue