Fix Z when following during pull, not when engaged and stationary or moving slightly

This commit is contained in:
Akkadius 2017-06-28 21:44:31 -05:00
parent e4f337edb6
commit 9b1a449fba

View File

@ -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<uint32>(PlayerState::Aggressive)))
SendAddPlayerState(PlayerState::Aggressive);