1
0
Fork 0

Merge pull request #62144 from Faless/mp/4.x_replication_config_setter

[Net] Fix SceneReplicationConfig setter.
This commit is contained in:
Fabio Alessandrelli 2022-06-17 18:10:23 +02:00 committed by GitHub
commit 7320871ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -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;
}
}