refactor: remove heap-allocated AABBs

This commit is contained in:
orng
2026-03-28 02:58:56 -05:00
parent e48a05bb8f
commit 7101d03c6a
88 changed files with 353 additions and 387 deletions

View File

@@ -55,10 +55,9 @@ bool NearestAttackableTargetGoal::canUse() {
return false;
double within = getFollowDistance();
AABB mob_bb = mob->bb->grow(within, 4, within);
AABB mob_bb = mob->bb.grow(within, 4, within);
std::vector<std::shared_ptr<Entity> >* entities =
mob->level->getEntitiesOfClass(
targetType, &mob_bb, selector);
mob->level->getEntitiesOfClass(targetType, &mob_bb, selector);
bool result = false;
if (entities != NULL && !entities->empty()) {