mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-12-22 01:26:50 +01:00
Tweak generation time
This commit is contained in:
parent
3b6430ef83
commit
bc75ec863b
@ -246,7 +246,7 @@ void VoxelTerrain::update_blocks() {
|
||||
VOXEL_PROFILE_END("block_update_sorting")
|
||||
|
||||
uint32_t time_before = os.get_ticks_msec();
|
||||
uint32_t max_time = 1000 / 60;
|
||||
uint32_t max_time = 1000 / 120;
|
||||
|
||||
// Update a bunch of blocks until none are left or too much time elapsed
|
||||
while (!_block_update_queue.empty() && (os.get_ticks_msec() - time_before) < max_time) {
|
||||
@ -325,6 +325,7 @@ static inline bool is_mesh_empty(Ref<Mesh> mesh_ref) {
|
||||
Mesh & mesh = **mesh_ref;
|
||||
if(mesh.get_surface_count() == 0)
|
||||
return true;
|
||||
// TODO Shouldn't it have an index to the surface rather than just the type? Oo
|
||||
if(mesh.surface_get_array_len(Mesh::ARRAY_VERTEX) == 0)
|
||||
return true;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user