mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
72bad478d6
commit
eac35f802a
@ -1221,7 +1221,7 @@ void NPC::RangedAttack(Mob* other)
|
|||||||
max_range *= max_range;
|
max_range *= max_range;
|
||||||
if(ComparativeDistance(m_Position, other->GetPosition()) > max_range)
|
if(ComparativeDistance(m_Position, other->GetPosition()) > max_range)
|
||||||
return;
|
return;
|
||||||
else if(DistNoRoot(*other) < (min_range * min_range))
|
else if(ComparativeDistance(m_Position, other->GetPosition()) < (min_range * min_range))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!other || !IsAttackAllowed(other) ||
|
if(!other || !IsAttackAllowed(other) ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user