Permalink
Browse files

Performance adjustment to SendPosition update logic

  • Loading branch information...
Akkadius committed Jul 13, 2017
1 parent c8b20ec commit be0374d1975c92841f8d2c1847a24cdef36bb8f9
Showing with 1 addition and 1 deletion.
  1. +1 −1 zone/mob.cpp
View
@@ -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;
}

0 comments on commit be0374d

Please sign in to comment.