Also add the reset code to VoxelPropJob.

This commit is contained in:
Relintai 2020-10-01 23:51:10 +02:00
parent 8ff53e4299
commit 643f76f7e8
2 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,13 @@ void VoxelPropJob::set_prop_mesher(const Ref<VoxelMesher> &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<VoxelChunkDefault> chunk = _chunk;

View File

@ -34,6 +34,7 @@ public:
Ref<VoxelMesher> get_prop_mesher() const;
void set_prop_mesher(const Ref<VoxelMesher> &mesher);
void phase_reset();
void phase_prop();
void _execute();