mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
[Z Clipping] Don't issue zclip adjustments when NPC is not moving (#3499)
This commit is contained in:
parent
ee45a28efe
commit
59537ae977
@ -1071,8 +1071,9 @@ void Mob::AI_Process() {
|
|||||||
|
|
||||||
if (engaged) {
|
if (engaged) {
|
||||||
if (IsNPC() && m_z_clip_check_timer.Check()) {
|
if (IsNPC() && m_z_clip_check_timer.Check()) {
|
||||||
auto t = GetTarget();
|
bool is_moving = IsMoving() && !(IsRooted() || IsStunned() || IsMezzed());
|
||||||
if (t) {
|
auto t = GetTarget();
|
||||||
|
if (is_moving && t) {
|
||||||
float self_z = GetZ() - GetZOffset();
|
float self_z = GetZ() - GetZOffset();
|
||||||
float target_z = t->GetPosition().z - t->GetZOffset();
|
float target_z = t->GetPosition().z - t->GetZOffset();
|
||||||
if (DistanceNoZ(GetPosition(), t->GetPosition()) < 75 &&
|
if (DistanceNoZ(GetPosition(), t->GetPosition()) < 75 &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user