From 2751369b54b74ef6448bae4c009cced53c44e7ef Mon Sep 17 00:00:00 2001 From: A-lex-Ra Date: Fri, 5 Jan 2024 16:42:08 +0600 Subject: [PATCH] idk --- src/voxels/Chunks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/voxels/Chunks.cpp b/src/voxels/Chunks.cpp index b44ce1a0..ff11ae2b 100644 --- a/src/voxels/Chunks.cpp +++ b/src/voxels/Chunks.cpp @@ -238,7 +238,7 @@ voxel* Chunks::rayCast(vec3 start, while (t <= maxDist){ voxel* voxel = get(ix, iy, iz); - if (!voxel){ return nullptr; } + if (voxel == nullptr){ return nullptr; } const Block* def = contentIds->getBlockDef(voxel->id); if (def->selectable){ @@ -343,7 +343,7 @@ vec3 Chunks::rayCastToObstacle(vec3 start, vec3 dir, float maxDist) { while (t <= maxDist) { voxel* voxel = get(ix, iy, iz); - if (!voxel) { return vec3(px + t * dx, py + t * dy, pz + t * dz); } + if (voxel == nullptr) { return vec3(px + t * dx, py + t * dy, pz + t * dz); } const Block* def = contentIds->getBlockDef(voxel->id); if (def->obstacle) {