keep propertiesMutex only for the initial set attempt, not for Register/SetProperty

This commit is contained in:
Emagi 2025-08-18 15:12:41 -04:00
parent 9162692a9f
commit eb6da37e3b

View File

@ -4021,6 +4021,7 @@ sint64 Entity::GetInfoStructSInt(std::string field)
bool Entity::SetInfoStructString(std::string field, std::string value)
{
{
std::shared_lock<std::shared_mutex> rlock(propertiesMutex);
map<string, boost::function<void(std::string)>>::const_iterator itr = set_string_funcs.find(field);
@ -4029,11 +4030,11 @@ bool Entity::SetInfoStructString(std::string field, std::string value)
(itr->second)(value);
return true;
}
else {
}
RegisterProperty(field);
SetProperty(field, value);
}
return false;
return true;
}