mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-17 05:32:25 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
309240de43
commit
53ad34b060
@ -2002,7 +2002,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
}
|
||||
if(spell_target != nullptr && spell_target != this) {
|
||||
//casting a spell on somebody but ourself, make sure they are in range
|
||||
float dist2 = DistNoRoot(*spell_target);
|
||||
float dist2 = ComparativeDistance(m_Position, spell_target->GetPosition());
|
||||
float range2 = range * range;
|
||||
float min_range2 = spells[spell_id].min_range * spells[spell_id].min_range;
|
||||
if(dist2 > range2) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user