Fix incorrect distance comparison return value (#432)
This commit is contained in:
parent
464cf91f4c
commit
206c6800f2
|
|
@ -34,7 +34,7 @@ bool NearestAttackableTargetGoal::DistComp::operator() (shared_ptr<Entity> e1, s
|
||||||
double distSqr2 = source->distanceToSqr(e2);
|
double distSqr2 = source->distanceToSqr(e2);
|
||||||
if (distSqr1 < distSqr2) return true;
|
if (distSqr1 < distSqr2) return true;
|
||||||
if (distSqr1 > distSqr2) return false;
|
if (distSqr1 > distSqr2) return false;
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
NearestAttackableTargetGoal::NearestAttackableTargetGoal(PathfinderMob *mob, const type_info& targetType, int randomInterval, bool mustSee, bool mustReach /*= false*/, EntitySelector *entitySelector /* =NULL */)
|
NearestAttackableTargetGoal::NearestAttackableTargetGoal(PathfinderMob *mob, const type_info& targetType, int randomInterval, bool mustSee, bool mustReach /*= false*/, EntitySelector *entitySelector /* =NULL */)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue