Fix close combat positioning issues

This commit is contained in:
Akkadius 2017-07-06 10:13:33 -05:00
parent 94b5684b42
commit f8b5637112

View File

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