Added flight mode ('F' button)

This commit is contained in:
MihailRis
2022-03-04 17:44:14 +03:00
committed by GitHub
parent 1dd9a72fb3
commit b6c328fe1d
7 changed files with 30 additions and 9 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ voxel* Chunks::rayCast(vec3 a, vec3 dir, float maxDist, vec3& end, vec3& norm, v
while (t <= maxDist){
voxel* voxel = get(ix, iy, iz);
if (voxel == nullptr || voxel->id){
if (voxel == nullptr || Block::blocks[voxel->id]->selectable){
end.x = px + t * dx;
end.y = py + t * dy;
end.z = pz + t * dz;