From 8f6ee6327e36d646ce6cf5e9e8b8857f7b7e0952 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Fri, 24 May 2024 21:17:56 -0700 Subject: [PATCH] add deep copy of config data --- dGame/dComponents/PropertyManagementComponent.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dGame/dComponents/PropertyManagementComponent.cpp b/dGame/dComponents/PropertyManagementComponent.cpp index 8fd8af22..8160afea 100644 --- a/dGame/dComponents/PropertyManagementComponent.cpp +++ b/dGame/dComponents/PropertyManagementComponent.cpp @@ -175,7 +175,6 @@ void PropertyManagementComponent::UpdatePropertyDetails(UpdatePropertyWithFilter if (!entity) return; if (update.name.empty()) { - update.name = "Objects_" + std::to_string(entity->GetLOT()) + "_name"; entity->EraseVar(u"userModelName"); } else { entity->SetVar(u"userModelName", update.name); @@ -360,7 +359,9 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N node->position = position; node->rotation = rotation; - node->config = item->GetConfig(); + for (const auto config : item->GetConfig()) { + node->config.push_back(config->Copy()); + } item->SetCount(item->GetCount() - 1);