TheSuperHackers / GeneralsGamePatch

Community Patch to fix and improve original Generals Zero Hour 1.04
Other
55 stars 19 forks source link

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

Open Stubbjax opened 3 years ago

Stubbjax commented 3 years ago

Aircraft can fall directly onto the ground when arriving at their airfield after it has been destroyed.

https://user-images.githubusercontent.com/11547761/131453215-363f3b12-daad-4c8d-a004-5f90a7645e14.mp4

When out of ammo, a plane will enter one of two states depending on whether the airfield exists after executing / completing an order (attack, move, stop, guard, etc.)

If the airfield exists: The plane will enter JetOrHeliReturnForLandingState. If the plane arrives at a dead airfield during this state, it will silently fall to the ground.

If the airfield does not exist: The plane will enter JetOrHeliReturningToDeadAirfieldState. Upon arrival, the plane will correctly enter JetOrHeliCirclingDeadAirfieldState, playing its respective VoiceLowFuel audio event and circling the location until its health is depleted.

The issue: The issue is that the airfield's destruction does not update the plane's state from JetOrHeliReturnForLandingState to JetOrHeliReturningToDeadAirfieldState, and otherwise that there is no behaviour defined for transitioning a plane from JetOrHeliReturnForLandingState to JetOrHeliCirclingDeadAirfieldState when it arrives at a dead airfield.

The below footage demonstrates the difference, where one airfield is sold before the aircraft's return, and the other during the aircraft's return. Because the right airfield does not exist after the aircraft complete their attack, the respective aircraft enter JetOrHeliReturningToDeadAirfieldState. Because the left airfield does exist after the aircraft complete their attack, the respective aircraft enter JetOrHeliReturnForLandingState.

https://user-images.githubusercontent.com/11547761/189486034-13f042e3-742d-43bc-b6e0-d53a52a4e72f.mp4

xezon commented 3 years ago

I think this is ok. Looks fun too (not for the pilot).

xezon commented 1 year ago

Upon second review I agree that this is bug. Plane ideally does not behave differently upon return to missing Airfield depending on when Airfield was deconstructed. It could change to JetOrHeliReturningToDeadAirfieldState after reaching the destination while the Airfield is gone.

ThePredatorBG commented 1 year ago

Just a note: Adding immunity to FALLING damage in the ArmorSet will make the planes survive the fall, which could be desired for gameplay reasons, but it would look awkward.

ImTimK commented 1 year ago

The falling "animation" looks really awkward in any case, not a desirable mechanic either. Hopefully can be changed to low fuel with the executable.

MTKing4 commented 1 year ago

It should always announce low fuel yes, fix the falling bug