mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
add deep copy of config data
This commit is contained in:
parent
d572ce1f1c
commit
8f6ee6327e
@ -175,7 +175,6 @@ void PropertyManagementComponent::UpdatePropertyDetails(UpdatePropertyWithFilter
|
|||||||
if (!entity) return;
|
if (!entity) return;
|
||||||
|
|
||||||
if (update.name.empty()) {
|
if (update.name.empty()) {
|
||||||
update.name = "Objects_" + std::to_string(entity->GetLOT()) + "_name";
|
|
||||||
entity->EraseVar(u"userModelName");
|
entity->EraseVar(u"userModelName");
|
||||||
} else {
|
} else {
|
||||||
entity->SetVar<std::string>(u"userModelName", update.name);
|
entity->SetVar<std::string>(u"userModelName", update.name);
|
||||||
@ -360,7 +359,9 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N
|
|||||||
|
|
||||||
node->position = position;
|
node->position = position;
|
||||||
node->rotation = rotation;
|
node->rotation = rotation;
|
||||||
node->config = item->GetConfig();
|
for (const auto config : item->GetConfig()) {
|
||||||
|
node->config.push_back(config->Copy());
|
||||||
|
}
|
||||||
|
|
||||||
item->SetCount(item->GetCount() - 1);
|
item->SetCount(item->GetCount() - 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user