fix: chunk gets removed from tree before deleting

This commit is contained in:
Sara Gerretsen 2026-02-25 23:11:32 +01:00
parent 0d982a751c
commit f0e63a1142
2 changed files with 16 additions and 15 deletions

View file

@ -100,6 +100,7 @@ void Terrain::construct_chunk_grid() {
}
this->workload_lock.lock();
for (TerrainChunkMesh *mesh : this->meshes) {
remove_child(mesh);
mesh->queue_free();
}
size_t const chunks_per_side{ this->side_length / this->chunk_size };