Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incinerate on defense #471

Merged
merged 1 commit into from
Apr 28, 2023
Merged

Conversation

Toranks
Copy link
Collaborator

@Toranks Toranks commented Apr 28, 2023

In rare cases, when the unit is already dead and the incinerate event try to do unstore_unit here, you get an error on the screen and various errors in the log:

20230428 15:43:48 error engine: failed to auto-store $unit at (39,26)
20230428 15:43:48 error engine: failed to auto-store $unit at (39,26)
20230428 15:43:48 error wml: [unstore_unit]: variable 'unit' doesn't contain unit data

20230428 15:43:48 error engine: failed to auto-store $unit at (39,26)
20230428 15:43:48 error engine: failed to auto-store $unit at (39,26)
20230428 15:43:48 error engine: failed to auto-store $unit at (39,26)
20230428 15:43:48 error engine: failed to auto-store $unit at (39,26)

To avoid this, simply use the same method as in the attacker_hits incinerate event, with the conditional

         [if]
             [have_unit]
                 find_in=unit
             [/have_unit]

[have_unit] will filter out units that are still alive after the attack. If the unit is died, the filter will do negative and it will stop.

@Dugy Dugy merged commit 1adf10b into Dugy:master Apr 28, 2023
@Dugy
Copy link
Owner

Dugy commented Apr 28, 2023

Thanks for fixing it.

@Toranks Toranks deleted the fixed-incinerate-on-defense branch May 9, 2023 19:30
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.

2 participants