forked from mirror/OpenTTD
Fix #6676: Prevent helicopters from stopping in midair during some kinds of landing
This adds a new flag that gets stored in the savegame, but it should still be compatible both ways, hence no save version bump.
This commit is contained in:
@@ -542,7 +542,8 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
case VEH_AIRCRAFT: {
|
||||
Aircraft *a = Aircraft::From(v);
|
||||
/* cannot stop airplane when in flight, or when taking off / landing */
|
||||
if (!(v->vehstatus & VS_CRASHED) && a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT);
|
||||
if (a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT);
|
||||
if (HasBit(a->flags, VAF_HELI_DIRECT_DESCENT)) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user