Skip to content

bugfix: Fix aircraft falling to their death if their Airfield is lost during their return flight - #3076

Open
Stubbjax wants to merge 4 commits into
TheSuperHackers:mainfrom
Stubbjax:fix-aircraft-stall-on-return-to-lost-airfield
Open

bugfix: Fix aircraft falling to their death if their Airfield is lost during their return flight#3076
Stubbjax wants to merge 4 commits into
TheSuperHackers:mainfrom
Stubbjax:fix-aircraft-stall-on-return-to-lost-airfield

Conversation

@Stubbjax

@Stubbjax Stubbjax commented Aug 8, 2026

Copy link
Copy Markdown

Fixes #27

This change fixes an issue where aircraft would stall and fall to the ground upon returning to an Airfield that was lost during their return flight.

A missing Airfield would erroneously return STATE_SUCCESS from the JetAIUpdate state machine's various states, which would transition through the state chain until the jet was idle; RETURN_FOR_LANDINGLANDING_AWAIT_CLEARANCELANDINGTAXI_FROM_LANDINGORIENT_FOR_PARKING_PLACE.

The ORIENT_FOR_PARKING_PLACE state already correctly returns STATE_FAILURE if the Airfield does not exist, ending the chain and causing the jet to go idle. However, TAXI_FROM_LANDING applies the parking/taxiing locomotor and so the jet gets stuck and falls to the ground.

All missing Airfield conditions along the chain now correctly return STATE_FAILURE, which aligns with the other failure conditions (e.g. is dead, no available runways, no available parking places) and sets the jet to idle before swapping its locomotor, preventing the undesirable behaviour.

Before

BEFORE.mp4

After

AFTER.mp4

@Stubbjax Stubbjax self-assigned this Aug 8, 2026
@Stubbjax Stubbjax added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Unit AI Is related to unit behavior Gen Relates to Generals ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility labels Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility Unit AI Is related to unit behavior ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate aircraft falling vertically to their death when their airfield is destroyed

1 participant