Skip to content

Restore z-normalizing while removing the frozen path thread.#273

Merged
billy1arm merged 1 commit intomangoszero:masterfrom
bozimmerman:pathing_bunnyhop_fix
Mar 16, 2026
Merged

Restore z-normalizing while removing the frozen path thread.#273
billy1arm merged 1 commit intomangoszero:masterfrom
bozimmerman:pathing_bunnyhop_fix

Conversation

@bozimmerman
Copy link
Contributor

@bozimmerman bozimmerman commented Mar 16, 2026

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 Reviewable

Copilot AI review requested due to automatic review settings March 16, 2026 02:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NormalizePath after building m_pathPoints to clamp path point Z values via UpdateAllowedPositionZ.
  • Remove the midpoint-insertion Z-smoothing loop from NormalizePath and 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.

@bozimmerman bozimmerman force-pushed the pathing_bunnyhop_fix branch from acd79a3 to 90744bf Compare March 16, 2026 02:56
@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@billy1arm billy1arm merged commit bd0b20c into mangoszero:master Mar 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants