diff --git a/world/jobs/voxel_prop_job.cpp b/world/jobs/voxel_prop_job.cpp index 4bca5e5..4176e13 100644 --- a/world/jobs/voxel_prop_job.cpp +++ b/world/jobs/voxel_prop_job.cpp @@ -43,6 +43,13 @@ void VoxelPropJob::set_prop_mesher(const Ref &mesher) { _prop_mesher = mesher; } +void VoxelPropJob::phase_reset() { + if (get_prop_mesher().is_valid()) { + get_prop_mesher()->reset(); + get_prop_mesher()->set_library(_chunk->get_library()); + } +} + void VoxelPropJob::phase_prop() { #ifdef MESH_DATA_RESOURCE_PRESENT Ref chunk = _chunk; diff --git a/world/jobs/voxel_prop_job.h b/world/jobs/voxel_prop_job.h index 238600e..4e86b0d 100644 --- a/world/jobs/voxel_prop_job.h +++ b/world/jobs/voxel_prop_job.h @@ -34,6 +34,7 @@ public: Ref get_prop_mesher() const; void set_prop_mesher(const Ref &mesher); + void phase_reset(); void phase_prop(); void _execute();