diff options
| author | ModMaker101 <119018978+ModMaker101@users.noreply.github.com> | 2026-03-04 11:41:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-04 23:41:59 +0700 |
| commit | 206c6800f29ac608eef00775ee6a52c12f6f86d6 (patch) | |
| tree | a12ba320216031ef19dc37a17e95a790254f5336 /Minecraft.World/NearestAttackableTargetGoal.cpp | |
| parent | 464cf91f4c88b9df7921e0e730ac638b356c7138 (diff) | |
Fix incorrect distance comparison return value (#432)
Diffstat (limited to 'Minecraft.World/NearestAttackableTargetGoal.cpp')
| -rw-r--r-- | Minecraft.World/NearestAttackableTargetGoal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Minecraft.World/NearestAttackableTargetGoal.cpp b/Minecraft.World/NearestAttackableTargetGoal.cpp index 1dbf587e..7ddd8895 100644 --- a/Minecraft.World/NearestAttackableTargetGoal.cpp +++ b/Minecraft.World/NearestAttackableTargetGoal.cpp @@ -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 */) |
