mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
[FixZ] Smooth out close combat npc/pet hopping
This commit is contained in:
parent
b22a88eccc
commit
b0a3e9205f
@ -1001,10 +1001,9 @@ void Mob::AI_Process() {
|
||||
if (this->GetTarget()) {
|
||||
/* 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());
|
||||
if (target_distance >= 25) {
|
||||
this->FixZ();
|
||||
}
|
||||
else if (!this->CheckLosFN(this->GetTarget())) {
|
||||
|
||||
if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) {
|
||||
Mob* target = this->GetTarget();
|
||||
|
||||
m_Position.x = target->GetX();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user