Fix NPC head explodey when they leave / reenter reality bubble with an activity #35649
+99
−6
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.
Summary
SUMMARY: Bugfixes "Fix NPC head explodey when they leave / reenter reality bubble with an activity"
Purpose of change
Fixes #35586
Describe the solution
There are two bugs ive fixed.
Describe alternatives you've considered
N/A
Testing
I tested on a tree chopping activity, walked away ( in the specific direction that would cause the tree to unload before the NPC does ) then walked back, there was one turn where the NPC was loaded and the tree was not, for that turn they paused, the next turn, the tree was loaded, and they resumed the activity properly.
I tested the attached issue savegame, and that is now fixed properly.
I did not test further on the leaving-bubble fix, for other activity types, or other permutations, as I need to sleep now, I will test further tomorrow, hence WIP for now, but code ready for review essentially.
Additional context
N/A