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

This commit is contained in:
Arthur Ice 2015-01-17 18:22:48 -08:00
parent d71fc61511
commit 86639f924d

View File

@ -4003,7 +4003,7 @@ void Bot::PetAIProcess() {
switch(pStandingPetOrder) { switch(pStandingPetOrder) {
case SPO_Follow: case SPO_Follow:
{ {
float dist = botPet->DistNoRoot(*botPet->GetTarget()); float dist = ComparativeDistance(botPet->GetPosition(), botPet->GetTarget()->GetPosition());
botPet->SetRunAnimSpeed(0); botPet->SetRunAnimSpeed(0);
if(dist > 184) { if(dist > 184) {
botPet->CalculateNewPosition2(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetTarget()->GetRunspeed()); botPet->CalculateNewPosition2(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetTarget()->GetRunspeed());