From f8b56371127af9a36a2dcb4f79da9da96c68d526 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 6 Jul 2017 10:13:33 -0500 Subject: [PATCH] Fix close combat positioning issues --- zone/mob_ai.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index dd814df12..d777c5f44 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1003,6 +1003,10 @@ void Mob::AI_Process() { if (DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()) > 50) { this->FixZ(); } + /* If we are close to client and our Z differences aren't big, match the client */ + else if (std::abs(this->GetZ() - this->GetTarget()->GetZ()) <= 5) { + this->m_Position.z = this->GetTarget()->GetZ(); + } } if (!(m_PlayerState & static_cast(PlayerState::Aggressive)))