Fix incorrect distance comparison return value (#432)

This commit is contained in:
ModMaker101 2026-03-04 11:41:59 -05:00 committed by GitHub
parent 464cf91f4c
commit 206c6800f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 */)