mirror of
https://github.com/Relintai/voxelman.git
synced 2025-04-15 21:06:06 +02:00
Make sure VoxelPropJob calls next job and sets itself to complete properly on every codepath.
This commit is contained in:
parent
50701f1740
commit
9824738095
@ -110,13 +110,15 @@ void VoxelPropJob::phase_prop() {
|
|||||||
Ref<VoxelChunkDefault> chunk = _chunk;
|
Ref<VoxelChunkDefault> chunk = _chunk;
|
||||||
|
|
||||||
if (!get_prop_mesher().is_valid()) {
|
if (!get_prop_mesher().is_valid()) {
|
||||||
next_phase();
|
set_complete(true); //So threadpool knows it's done
|
||||||
|
next_job();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (should_do()) {
|
if (should_do()) {
|
||||||
if (chunk->get_mesh_data_resource_count() == 0) {
|
if (chunk->get_mesh_data_resource_count() == 0) {
|
||||||
next_phase();
|
set_complete(true); //So threadpool knows it's done
|
||||||
|
next_job();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,9 +129,10 @@ void VoxelPropJob::phase_prop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_prop_mesher()->get_vertex_count() == 0) {
|
if (get_prop_mesher()->get_vertex_count() == 0) {
|
||||||
reset_stages();
|
//reset_stages();
|
||||||
|
|
||||||
next_phase();
|
set_complete(true); //So threadpool knows it's done
|
||||||
|
next_job();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,6 +375,7 @@ void VoxelPropJob::_reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VoxelPropJob::VoxelPropJob() {
|
VoxelPropJob::VoxelPropJob() {
|
||||||
|
set_build_phase_type(BUILD_PHASE_TYPE_PHYSICS_PROCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
VoxelPropJob::~VoxelPropJob() {
|
VoxelPropJob::~VoxelPropJob() {
|
||||||
|
Loading…
Reference in New Issue
Block a user