mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-20 10:47:19 +01:00
Uncomment a mesh data resource check. Also handle if phase gets too high in VoxelTerrarinJob.
This commit is contained in:
parent
e42931597c
commit
9de15f0b0f
@ -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();
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user