From 8f9b7896f60219cd21a2ef54996818c64ec74203 Mon Sep 17 00:00:00 2001 From: Zi Ye Date: Thu, 5 Jun 2025 19:16:38 -0500 Subject: [PATCH] Make LightmapGIData::_set_user_data a proper setter instead of an additive operation --- scene/3d/lightmap_gi.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 0ce24f87564..e015a6daa19 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -81,9 +81,8 @@ void LightmapGIData::clear_users() { } void LightmapGIData::_set_user_data(const Array &p_data) { - ERR_FAIL_COND(p_data.is_empty()); ERR_FAIL_COND((p_data.size() % 4) != 0); - + users.clear(); for (int i = 0; i < p_data.size(); i += 4) { add_user(p_data[i + 0], p_data[i + 1], p_data[i + 2], p_data[i + 3]); }