mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-08 06:48:40 +00:00
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);
|
||||
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 */)
|
||||
|
|
|
|||
Loading…
Reference in a new issue