fa icon indicating copy to clipboard operation
fa copied to clipboard

Fix missing unit param for SpecificUnitsInArea objective type

Open Dhomie opened this issue 3 months ago • 2 comments

Issue

Normally when an objective has reached some kind of result (success, failure), depending on its type, it provides the result, and additional data for callback functions to use, like units. The SpecificUnitsInArea type however is missing that extra data, specifically the destroyed unit if it triggers objective failure. Right now this oversight breaks the Seraphim mission Tha-Atha-Aez, as the callbacks tries to reference the unit, which is just nil, and basically softlocking the death camera mission failure cinematics. The game has to be closed.

Description of the proposed changes

Simply add the unit as a parameter for OnResult when it's called via the unit's death. Not only it fixes the map (mostly), it also prevents the same errors for future missions where mission developers want to use the unit via objective callbacks.

Testing done on the proposed changes

The mission Tha-Atha-Aez is relevant for this. The first 2 allied ACU escort mission failures should trigger proper. The 3rd however has an error in the map script, there's no unit param defined in the AddResultCallback section, so it's map specific.

Dhomie avatar Sep 21 '25 09:09 Dhomie

I haven't the slightest idea what those changes are. When I synced my FAF fork, it was simply there. Edit: Issue lied in my fork using the deploy/fafdevelop branch as the default. Anyhow, I undid those changes.

Dhomie avatar Sep 23 '25 14:09 Dhomie

@Dhomie The base branch is develop. It used to be deploy/fafdevelop for a long time. The commit originates from the deployment workflow. It helps us identify what game version and what specific git commit the user is running when they share a game log.

For future pull requests, start from develop 😄 !

Garanas avatar Sep 25 '25 15:09 Garanas