fix(engine): Follow pathing and walk triggers behave closer to pre-2007 behavior #1238
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.
Following a player before 2007 was pid dependent. With this PR, behavior should now match pre-2007 behavior.
Further, there were some bugs with how walktriggers are handled. They should now more accurately match expected behavior
Follow Example 1
When following a player, it should be pid-dependent whether or not you follow two tiles or three tiles back
In this video from 2006, we see that the players clearly get separated into two distinct groups based on pid
New 2004scape behavior
2025-02-08.20-29-20.mp4
With this PR, 2004scape now correctly sorts following players into two groups depending on pid. This should be the expected behavior.
Follow Example 2
Before 2023 in OSRS and pre-OSRS, if a player teleported away while you were following them, you would continue following them. In the previous 2004scape iteration, it clears your follow interaction if the player is no longer within 25 tiles of you. This is not how it should behave.
Old 2004scape Behavior
2025-02-08.20-58-47.mp4
New 2004scape Behavior
2025-02-08.20-58-06.mp4
Follow Example 3
New 2004scape behavior
2025-02-08.20-16-53.mp4
This follow dance wasn't possible in the previous iteration
In this video you can see two players performing this follow dance
Walktrigger Example 1
Previously, stuns were not correctly clearing the follow interaction in certain edge cases. Further, walktriggers are now handled more appropriately in general.
Previous 2004scape behavior
2025-02-08_00-32-18.mp4
Before this PR, if you were stunned and next to a player, you would run the stun walktrigger every tick. The expected behavior is that you clear the follow interaction because you are stunned
New 2004scape behavior
2025-02-08.20-35-36.mp4
Now the stun walktrigger runs a single time and then appropriately clears the follow interaction