Jump to content

Ejecting player pilot deserts to neutral (tiny glitch/bug?)


Recommended Posts

Posted

Hi all, 

     while writing some code to automagically create CSAR missions for pilots that have ejected and made it to the ground alive, I've come across a small glitch that surprised me and is probably unintended:

The set-up:

  • blue player ejects from aircraft
  • after ejection, and before pilot separates from ejector (i.e. before  S_EVENT_DISCARD_CHAIR_AFTER_EJECTION is issued), player re-slots to another aircraft
  • The parachuting pilot changes affiliation from blue to neutral upon separating from chair and then remains neutral.

This only matters if a mission triggers on S_EVENT_LANDING_AFTER_EJECTION to create CSAR missions (the pilot, now being neutral, cannot be attributed to the correct side), but it seems a strange quirk.

Mission to re-produce at will supplied. Procedure to re-produce symptom:

  • enter KA-50, eject
  • immediately hit esc and re-slot to the Huey
  • Go to F10 and view map, look for ejected pilot 
  • Click to verify that the pilot is now (incorrectly) neutral

 

pilot deserter.miz

Posted

Hi @cfrag, FWIW it is possible to keep track of such pilot's origins through the 3 events eject/discard chair/landing. Quick test example attached (when landing the pilot is detected as neutral coalition and neutral country (ID 99), but checking its origins through a table turns his coalition to blue and country to USA, allowing spawn of a replacement unit for extraction purpose).

ejectedPilot-trackOrigin.jpg

Test-ejectedPilot-trackOrigin.miz

Posted
16 minutes ago, toutenglisse said:

FWIW it is possible to keep track of such pilot's origins through the 3 events eject/discard chair/landing

Ha - clever! 🙂  Thank you so much, @toutenglisse! Yes indeed that way it is possible to establish the link (the significance of event.target for discard_chair eluded me;  now makes sense in hindsight).

Still, I think it would be easer for everyone if this kind of "threading the needle back to its origin" could be avoided altogether if the pilot stayed with their coalition.

Thank you so much for the hint!

-ch

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...