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

@@ -585,14 +585,14 @@ void LevelRenderer::renderEntities(Vec3* cam, Culler* culler, float a) {
bool shouldRender =
(entity->shouldRender(cam) &&
(entity->noCulling || culler->isVisible(entity->bb)));
(entity->noCulling || culler->isVisible(&entity->bb)));
// Render the mob if the mob's leash holder is within the culler
if (!shouldRender && entity->instanceof(eTYPE_MOB)) {
std::shared_ptr<Mob> mob = std::dynamic_pointer_cast<Mob>(entity);
if (mob->isLeashed() && (mob->getLeashHolder() != NULL)) {
std::shared_ptr<Entity> leashHolder = mob->getLeashHolder();
shouldRender = culler->isVisible(leashHolder->bb);
shouldRender = culler->isVisible(&leashHolder->bb);
}
}