Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead

This commit is contained in:
Arthur Ice 2015-01-18 01:19:45 -08:00
parent 309240de43
commit 53ad34b060

View File

@ -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) {