Restore z-normalizing while removing the frozen path thread.#273
Merged
billy1arm merged 1 commit intomangoszero:masterfrom Mar 16, 2026
Merged
Restore z-normalizing while removing the frozen path thread.#273billy1arm merged 1 commit intomangoszero:masterfrom
billy1arm merged 1 commit intomangoszero:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Restores path Z-normalization during point-path construction to prevent visible “hopping” over uneven terrain, while removing a previously problematic Z-smoothing midpoint insertion loop that could hang the server.
Changes:
- Call
NormalizePathafter buildingm_pathPointsto clamp path point Z values viaUpdateAllowedPositionZ. - Remove the midpoint-insertion Z-smoothing loop from
NormalizePathand replace it with an explanatory note.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
acd79a3 to
90744bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
So, this fixes the cosmetic blemish of npcs, pets, etc "hopping" around when near uneven terrain. There WAS, at one point, a fix for this -- an existing method called "NormalizePath". However, that method was completely freezing the server, which I quickly discovered. So, when restoring the z-position fix, I also removed the offending z-smoothing code that kept getting stuck in an infinite loop.
SO! The smoothing was probably wise in general, and just broken in implementation. I went ahead with the minimal fix that got rid of the ridiculous hopping, without the broken smoothing. Circling back to that code later might be wise though, as I'm sure it was important in some situations.
This change is