From 9b1a449fbaa5a9aee5173fda93b269787c827647 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 28 Jun 2017 21:44:31 -0500 Subject: [PATCH] Fix Z when following during pull, not when engaged and stationary or moving slightly --- zone/mob_ai.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 07f89ca63..20d22c42f 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -996,8 +996,11 @@ void Mob::AI_Process() { if (engaged) { + /* Fix Z when following during pull, not when engaged and stationary */ if (moving && fix_z_timer_engaged.Check()) - this->FixZ(); + if(this->GetTarget()) + if(DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()) > 50) + this->FixZ(); if (!(m_PlayerState & static_cast(PlayerState::Aggressive))) SendAddPlayerState(PlayerState::Aggressive);