mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +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 (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();
|
||||||
}
|
|
||||||
else if (!this->CheckLosFN(this->GetTarget())) {
|
if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) {
|
||||||
Mob* target = this->GetTarget();
|
Mob* target = this->GetTarget();
|
||||||
|
|
||||||
m_Position.x = target->GetX();
|
m_Position.x = target->GetX();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user