refactor: make Tile::getAABB return optional<AABB>

This commit is contained in:
orng
2026-03-28 00:11:19 -05:00
parent 78b5255224
commit 7158fd398f
71 changed files with 205 additions and 139 deletions

View File

@@ -91,10 +91,9 @@ AABB* DoorTile::getTileAABB(Level* level, int x, int y, int z) {
return retval;
}
AABB* DoorTile::getAABB(Level* level, int x, int y, int z) {
std::optional<AABB> DoorTile::getAABB(Level* level, int x, int y, int z) {
updateShape(level, x, y, z);
AABB* retval = Tile::getAABB(level, x, y, z);
return retval;
return Tile::getAABB(level, x, y, z);
}
void DoorTile::updateShape(
@@ -307,4 +306,4 @@ void DoorTile::playerWillDestroy(Level* level, int x, int y, int z, int data,
}
}
}
}
}