Fix TerrainChunk::light_remove_index() not actually remoing lights.

This commit is contained in:
Relintai 2025-04-04 16:24:48 +02:00
parent ffa4cf938f
commit 20f5439a82

View File

@ -746,6 +746,10 @@ void TerrainChunk::light_remove_index(const int index) {
Ref<TerrainLight> light = _lights[index];
_lights.remove(index);
light->set_has_owner_chunk(false);
light->disconnect("light_moved", this, "_on_light_moved");
TerrainWorld *world = get_voxel_world();
if (ObjectDB::instance_validate(world)) {