[Vanilla Fix] Aircraft which crash offmap are not properly removed#2149
[Vanilla Fix] Aircraft which crash offmap are not properly removed#2149CnCRAZER wants to merge 2 commits intoPhobos-developers:developfrom
Conversation
Add documentation and credit for a bug fix where aircraft destroyed while crashing off-map were not fully cleaned up, which could permanently block production slots and count toward unit limits. Updates CREDITS.md and adds entries to Fixed-or-Improved-Logics.md and Whats-New.md (credit to RAZER).
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
TaranDahl
left a comment
There was a problem hiding this comment.
What causes off-map or not to have different effects on crash behavior? The position you hooked doesn't seem to have such a difference.
AFAIK offmap aircraft types are only removed if they are spawned from spawner or from teamtypes exiting the map. Running uninit to clear the unit from map is also only checked if aircraft type is within radar bounds |
|
check the discord Phobos chat for the conversation regarding it |
|
I checked this. I think the location of the fix in your PR is incorrect. |
This pull request addresses an important bug related to aircraft units destroyed while crashing off the visible map area. Previously, these aircraft were not properly cleaned up, which could permanently block production slots and incorrectly count toward unit limits. The fix ensures that such aircraft are now correctly removed from the game state. The main changes are as follows:
Bug Fixes and Cleanup:
src/Misc/Hooks.BugFixes.cppto detect aircraft that are destroyed while crashing off-map and force their cleanup by callingUnInit(). This prevents them from blocking production and unit limits.Documentation Updates:
docs/Fixed-or-Improved-Logics.mdto describe the fix for aircraft destroyed while crashing off-map never being fully cleaned up.docs/Whats-New.mdto mention the new fix for aircraft cleanup off-map.CREDITS.mdto credit the contributor for the aircraft cleanup fix.