From be0374d1975c92841f8d2c1847a24cdef36bb8f9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 13 Jul 2017 00:52:42 -0500 Subject: [PATCH] Performance adjustment to SendPosition update logic --- zone/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index eebb9798f..68f55626b 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1445,7 +1445,7 @@ void Mob::SendPosition() MakeSpawnUpdateNoDelta(spu); /* When an NPC has made a large distance change - we should update all clients to prevent "ghosts" */ - if (DistanceNoZ(last_major_update_position, m_Position) > 100) { + if (DistanceSquared(last_major_update_position, m_Position) > (100 * 100)) { entity_list.QueueClients(this, app, true, true); last_major_update_position = m_Position; }