Fix incorrect distance comparison return value

This commit is contained in:
Chase Cooper 2026-03-04 11:33:13 -05:00
parent 2be856a2d4
commit 28368661b3

View file

@ -34,7 +34,7 @@ bool NearestAttackableTargetGoal::DistComp::operator() (shared_ptr<Entity> e1, s
double distSqr2 = source->distanceToSqr(e2);
if (distSqr1 < distSqr2) return true;
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 */)