Uncomment a mesh data resource check. Also handle if phase gets too high in VoxelTerrarinJob.

This commit is contained in:
Relintai 2020-10-07 11:54:30 +02:00
parent e42931597c
commit 9de15f0b0f
2 changed files with 12 additions and 7 deletions

View File

@ -334,9 +334,9 @@ void VoxelPropJob::_execute_phase() {
Ref<VoxelChunkDefault> chunk = _chunk;
if (!chunk.is_valid()
//#ifdef MESH_DATA_RESOURCE_PRESENT
#ifdef MESH_DATA_RESOURCE_PRESENT
|| chunk->get_mesh_data_resource_count() == 0
//#endif
#endif
) {
set_complete(true);
next_job();

View File

@ -575,16 +575,21 @@ void VoxelTerrarinJob::_execute_phase() {
ERR_FAIL_COND(!library.is_valid());
if (_phase == 0)
if (_phase == 0) {
phase_setup();
else if (_phase == 1)
} else if (_phase == 1) {
phase_terrarin_mesh_setup();
else if (_phase == 2)
} else if (_phase == 2) {
phase_collider();
else if (_phase == 4)
} else if (_phase == 4) {
phase_terrarin_mesh();
else if (_phase == 5)
} else if (_phase == 5) {
phase_finalize();
} else if (_phase > 5) {
set_complete(true); //So threadpool knows it's done
next_job();
ERR_FAIL_MSG("VoxelTerrarinJob: _phase is too high!");
}
}
void VoxelTerrarinJob::_reset() {