Skip to content

Commit

Permalink
Merge pull request #62144 from Faless/mp/4.x_replication_config_setter
Browse files Browse the repository at this point in the history
[Net] Fix SceneReplicationConfig setter.
  • Loading branch information
Faless authored Jun 17, 2022
2 parents 4463dd9 + 32b16c8 commit 7320871
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scene/resources/scene_replication_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7320871

Please sign in to comment.