1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[MP] Optimize internal SceneReplicationConfig access

Use direct pointer addressing to avoid unnecessary refs/unrefs
This commit is contained in:
Fabio Alessandrelli
2023-10-02 10:56:21 +02:00
parent 311a27281f
commit 5df7577a05
4 changed files with 15 additions and 10 deletions

View File

@@ -239,8 +239,8 @@ void MultiplayerDebugger::RPCProfiler::tick(double p_frame_time, double p_proces
MultiplayerDebugger::SyncInfo::SyncInfo(MultiplayerSynchronizer *p_sync) {
ERR_FAIL_NULL(p_sync);
synchronizer = p_sync->get_instance_id();
if (p_sync->get_replication_config().is_valid()) {
config = p_sync->get_replication_config()->get_instance_id();
if (p_sync->get_replication_config_ptr()) {
config = p_sync->get_replication_config_ptr()->get_instance_id();
}
if (p_sync->get_root_node()) {
root_node = p_sync->get_root_node()->get_instance_id();