world ceiling removed

This commit is contained in:
MihailRis
2024-03-05 14:51:40 +03:00
parent 13a8c61ee1
commit 45a7bd190a
+4
View File
@@ -55,9 +55,13 @@ const AABB* Chunks::isObstacleAt(float x, float y, float z){
int iz = floor(z); int iz = floor(z);
voxel* v = get(ix, iy, iz); voxel* v = get(ix, iy, iz);
if (v == nullptr) { if (v == nullptr) {
if (iy >= CHUNK_H) {
return nullptr;
} else {
static const AABB empty; static const AABB empty;
return ∅ return ∅
} }
}
const Block* def = contentIds->getBlockDef(v->id); const Block* def = contentIds->getBlockDef(v->id);
if (def->obstacle) { if (def->obstacle) {
const auto& boxes = def->rotatable const auto& boxes = def->rotatable