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

This commit is contained in:
Arthur Ice 2015-01-18 00:48:51 -08:00
parent 37e4829ac4
commit a0d012a6d6

View File

@ -1812,7 +1812,7 @@ void NPC::AI_DoMovement() {
ClearFeignMemory(); ClearFeignMemory();
moved=false; moved=false;
SetMoving(false); SetMoving(false);
if (GetTarget() == nullptr || DistNoRoot(*GetTarget()) >= 5*5 ) if (GetTarget() == nullptr || ComparativeDistance(m_Position, GetTarget()->GetPosition()) >= 5*5 )
{ {
SetHeading(m_GuardPoint.m_Heading); SetHeading(m_GuardPoint.m_Heading);
} else { } else {