mirror of https://github.com/godotengine/godot
Merge pull request #62144 from Faless/mp/4.x_replication_config_setter
[Net] Fix SceneReplicationConfig setter.
This commit is contained in:
commit
7320871ffa
|
|
@ -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