(svn r15750) -Fix: The big ufo sometimes landed just outside the map. Instead of landing, just disappear (fly away) in those cases.

pull/155/head
yexo 15 years ago
parent f7a7a1f158
commit cec7005749

@ -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…
Cancel
Save