From 5d3aa83ffae0fdf8662df74414691086e212c564 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 4 Apr 2025 01:14:23 +0200 Subject: [PATCH] Rebuild chunks in TerrainWorld::prop_add(). --- modules/terraman/world/terrain_world.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/terraman/world/terrain_world.cpp b/modules/terraman/world/terrain_world.cpp index 4b5fab263..18863241f 100644 --- a/modules/terraman/world/terrain_world.cpp +++ b/modules/terraman/world/terrain_world.cpp @@ -636,6 +636,7 @@ void TerrainWorld::prop_add(Transform transform, const Ref &prop, cons Ref chunk = get_or_create_chunk_at_world_position(wp); chunk->prop_add(transform, prop, p_original); + chunk->build(); int count = prop->get_prop_count(); for (int i = 0; i < count; ++i) { @@ -724,6 +725,7 @@ void TerrainWorld::prop_add(Transform transform, const Ref &prop, cons chunk_local_tform.origin = chunk->to_local(chunk_local_tform.origin); chunk->mesh_data_resource_add(chunk_local_tform, mdr, mesh_data->get_texture(), Color(1, 1, 1, 1), false, false); + chunk->build(); continue; } @@ -745,6 +747,7 @@ void TerrainWorld::light_add(const Ref &light) { ERR_FAIL_COND(!chunk.is_valid()); chunk->light_add(light); + chunk->build(); } void TerrainWorld::light_remove(const Ref &light) { if (!light.is_valid()) {