Skip to content

Conversation

Dhomie
Copy link
Contributor

@Dhomie Dhomie commented Sep 21, 2025

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.

FAForeverBot and others added 2 commits September 18, 2025 21:14
Add the destroyed unit as a param for OnResult.
Copy link
Member

@4z0t 4z0t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo changes in unrelated files.

@Dhomie
Copy link
Contributor Author

Dhomie commented Sep 23, 2025

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.

@Garanas
Copy link
Member

Garanas commented Sep 25, 2025

@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 😄 !

Copy link
Member

@Garanas Garanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change seems fine to me. I think it is backwards compatible because of how Lua works with function arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants