From ba1a317119ef161bc568b92b851b975458eaac59 Mon Sep 17 00:00:00 2001 From: Shea Date: Sun, 3 Dec 2017 11:33:29 -0600 Subject: [PATCH] Add distance logic to mobs that move --- zone/mob.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zone/mob.cpp b/zone/mob.cpp index 9157b2fe8..322bc7658 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1480,6 +1480,11 @@ void Mob::SendPositionUpdate(uint8 iSendToSelf) { CastToClient()->FastQueuePacket(&app, false); } } + else if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { + entity_list.QueueClients(this, app, true, true); + last_major_update_position = m_Position; + is_distance_roamer = true; + } else { entity_list.QueueCloseClients(this, app, (iSendToSelf == 0), RuleI(Range, MobPositionUpdates), nullptr, false); }