[Pathing] Improvements to roambox logic, pathing (#3502)

* [Roambox] Improvements to roambox logic

* Update npc.cpp

* Update npc.cpp

* More pathing fixes
This commit is contained in:
Chris Miles
2023-07-18 02:52:04 -05:00
committed by GitHub
parent 3f3bbe98b5
commit f9dc9da42b
4 changed files with 43 additions and 6 deletions
+8 -1
View File
@@ -846,8 +846,15 @@ void Mob::FixZ(int32 z_find_offset /*= 5*/, bool fix_client_z /*= false*/) {
glm::vec3 current_loc(m_Position);
float new_z = GetFixedZ(current_loc, z_find_offset);
if (new_z == m_Position.z)
// reject z if it is too far from the current z
if (std::abs(new_z - m_Position.z) > 100) {
return;
}
// reject if it's the same as the current z
if (new_z == m_Position.z) {
return;
}
if ((new_z > -2000) && new_z != BEST_Z_INVALID) {
if (RuleB(Map, MobZVisualDebug)) {