refactor: modernize AABB class

This commit is contained in:
orng
2026-03-27 21:11:11 -05:00
parent da7cbcb4b6
commit 79217ca8e3
53 changed files with 362 additions and 357 deletions

View File

@@ -119,8 +119,9 @@ void ItemEntity::tick() {
}
void ItemEntity::mergeWithNeighbours() {
AABB grown = bb->grow(0.5, 0, 0.5);
std::vector<std::shared_ptr<Entity> >* neighbours =
level->getEntitiesOfClass(typeid(*this), bb->grow(0.5, 0, 0.5));
level->getEntitiesOfClass(typeid(*this), &grown);
for (AUTO_VAR(it, neighbours->begin()); it != neighbours->end(); ++it) {
std::shared_ptr<ItemEntity> entity =
std::dynamic_pointer_cast<ItemEntity>(*it);