[FixZ] Smooth out close combat npc/pet hopping

This commit is contained in:
Akkadius 2017-08-21 02:42:50 -05:00
parent b22a88eccc
commit b0a3e9205f

View File

@ -1001,10 +1001,9 @@ void Mob::AI_Process() {
if (this->GetTarget()) { if (this->GetTarget()) {
/* If we are engaged, moving and following client, let's look for best Z more often */ /* If we are engaged, moving and following client, let's look for best Z more often */
float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()); float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition());
if (target_distance >= 25) { this->FixZ();
this->FixZ();
} if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) {
else if (!this->CheckLosFN(this->GetTarget())) {
Mob* target = this->GetTarget(); Mob* target = this->GetTarget();
m_Position.x = target->GetX(); m_Position.x = target->GetX();