Make air staging detach units when killed #6665
Open
+19
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Workaround for a bug posted on discord: https://discord.com/channels/197033481883222026/1322240211429883935
Units can get stuck inside air staging late game when there are many units.
Description of the proposed changes
Detach units from the air staging when it is killed.
Kill
is hooked because the C functionKill
kills all attached units, so we cannot detach them inOnKilled
.Testing done on the proposed changes
Spawn an air staging and get some aircraft to low fuel with
wld_runwiththewind
. Dock the aircraft and kill the air staging with ctrl k or a unit. The aircraft should detach when it dies.Checklist