[Net] Fix SceneReplicationConfig setter.
Used by resource loader, it would always add properties as both sync and spawn, disregarding the actual option value.
This commit is contained in:
parent
78944fef82
commit
32b16c876b
@ -52,11 +52,19 @@ bool SceneReplicationConfig::_set(const StringName &p_name, const Variant &p_val
|
||||
ReplicationProperty &prop = properties[idx];
|
||||
if (what == "sync") {
|
||||
prop.sync = p_value;
|
||||
sync_props.push_back(prop.name);
|
||||
if (prop.sync) {
|
||||
sync_props.push_back(prop.name);
|
||||
} else {
|
||||
sync_props.erase(prop.name);
|
||||
}
|
||||
return true;
|
||||
} else if (what == "spawn") {
|
||||
prop.spawn = p_value;
|
||||
spawn_props.push_back(prop.name);
|
||||
if (prop.spawn) {
|
||||
spawn_props.push_back(prop.name);
|
||||
} else {
|
||||
spawn_props.erase(prop.name);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user