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 pulping"
Purpose of change
Fixes #36166
Describe the solution
#35649 introduced outbounds checking for NPC activities, so they could stash their activity and resume it properly when entering/leaving reality bubble, without encountering infinite loops.
This relied on activity.placement being abs coords, ( because of submap shifting, when NPCs arent very close to you ), and most NPC activities used abs coords for activity.placement for precisely this reason.
ACT_PULP however , used local co-ord,s so when the outbounds activity checking ran getlocal on that coord, it counted as out bounds, and therefore the activity was stashed, but then restarted immediately the next turn, ad infinitum.
Ive changed the act.placement to abs for player and NPC, this should be more robust anyway, any activity that an NPC can do should be using abs coords to target and place things, because they sometimes wont be in the same submap as player.
Describe alternatives you've considered
There are probably other activities that need converting to abs, that may have problems too, I can look into this next.
Testing
Made a zombie corpse, NPC expressed their desire to smash it, they then stood over it doing nothing forever.
AFter this fix - the activity completes as expected.
Additional context
N/A