From 0ab76c86bcecbeef6c725efa730e2a53d30e7b61 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 9 Feb 2022 14:10:58 +0100 Subject: [PATCH] Set num_lods in _create_chunk for now, it really needs to be removed though. --- world/blocky/voxel_world_blocky.cpp | 3 +++ world/cubic/voxel_world_cubic.cpp | 3 +++ world/default/voxel_world_default.cpp | 5 ++++- world/marching_cubes/voxel_world_marching_cubes.cpp | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/world/blocky/voxel_world_blocky.cpp b/world/blocky/voxel_world_blocky.cpp index 80b6b0a..3a3b3f8 100644 --- a/world/blocky/voxel_world_blocky.cpp +++ b/world/blocky/voxel_world_blocky.cpp @@ -107,6 +107,9 @@ Ref VoxelWorldBlocky::_create_chunk(int x, int y, int z, Refjob_add(lj); chunk->job_add(tj); chunk->job_add(pj); + + // TODO this should be removed + set_num_lods(5); } return VoxelWorld::_create_chunk(x, y, z, chunk); diff --git a/world/cubic/voxel_world_cubic.cpp b/world/cubic/voxel_world_cubic.cpp index e48d034..cf6db86 100644 --- a/world/cubic/voxel_world_cubic.cpp +++ b/world/cubic/voxel_world_cubic.cpp @@ -108,6 +108,9 @@ Ref VoxelWorldCubic::_create_chunk(int x, int y, int z, Refjob_add(lj); chunk->job_add(tj); chunk->job_add(pj); + + // TODO this should be removed + set_num_lods(5); } return VoxelWorld::_create_chunk(x, y, z, chunk); diff --git a/world/default/voxel_world_default.cpp b/world/default/voxel_world_default.cpp index a8692ff..e88982d 100644 --- a/world/default/voxel_world_default.cpp +++ b/world/default/voxel_world_default.cpp @@ -253,6 +253,9 @@ Ref VoxelWorldDefault::_create_chunk(int x, int y, int z, Refjob_add(lj); chunk->job_add(tj); chunk->job_add(pj); + + // TODO this should be removed + set_num_lods(5); } Ref vcd = chunk; @@ -291,7 +294,7 @@ VoxelWorldDefault::VoxelWorldDefault() { _lod_update_timer = 0; _lod_update_interval = 0.5; _build_flags = VoxelChunkDefault::BUILD_FLAG_CREATE_COLLIDER | VoxelChunkDefault::BUILD_FLAG_CREATE_LODS; - _num_lods = 4; + _num_lods = 0; set_data_margin_start(1); set_data_margin_end(1); diff --git a/world/marching_cubes/voxel_world_marching_cubes.cpp b/world/marching_cubes/voxel_world_marching_cubes.cpp index 2f95a8d..b6d263b 100644 --- a/world/marching_cubes/voxel_world_marching_cubes.cpp +++ b/world/marching_cubes/voxel_world_marching_cubes.cpp @@ -109,6 +109,9 @@ Ref VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref< chunk->job_add(lj); chunk->job_add(tj); chunk->job_add(pj); + + // TODO this should be removed + set_num_lods(5); } return VoxelWorld::_create_chunk(x, y, z, chunk);