Skip to content

Commit c535f56

Browse files
committed
Merge pull request #107192 from MajorMcDoom/lightmap-allow-empty-user-data
Make `LightmapGIData::_set_user_data` a proper setter instead of an additive operation
2 parents 28ed695 + 8f9b789 commit c535f56

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scene/3d/lightmap_gi.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ void LightmapGIData::clear_users() {
8181
}
8282

8383
void LightmapGIData::_set_user_data(const Array &p_data) {
84-
ERR_FAIL_COND(p_data.is_empty());
8584
ERR_FAIL_COND((p_data.size() % 4) != 0);
86-
85+
users.clear();
8786
for (int i = 0; i < p_data.size(); i += 4) {
8887
add_user(p_data[i + 0], p_data[i + 1], p_data[i + 2], p_data[i + 3]);
8988
}

0 commit comments

Comments
 (0)