summaryrefslogtreecommitdiffstats
path: root/scene/multiplayer/scene_replication_interface.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-02-06 02:29:08 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-02-06 17:36:48 +0100
commit87f4bbd6685fd6e2e43b05a6255ab360bd17dcf3 (patch)
treedc68c4c329f8ad56211d297fb27ff7b1d14c6105 /scene/multiplayer/scene_replication_interface.cpp
parent789e648f4d5cf629240e8bcc7042322088a79949 (diff)
downloadredot-engine-87f4bbd6685fd6e2e43b05a6255ab360bd17dcf3.tar.gz
[Debugger] Move most profilers to ServersDebugger.
Also splits bandwidth/rpc profiler (RPCProfiler is now in SceneDebugger).
Diffstat (limited to 'scene/multiplayer/scene_replication_interface.cpp')
-rw-r--r--scene/multiplayer/scene_replication_interface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/multiplayer/scene_replication_interface.cpp b/scene/multiplayer/scene_replication_interface.cpp
index 2088a43ba7..25a704b37e 100644
--- a/scene/multiplayer/scene_replication_interface.cpp
+++ b/scene/multiplayer/scene_replication_interface.cpp
@@ -147,6 +147,11 @@ Error SceneReplicationInterface::_send_raw(const uint8_t *p_buffer, int p_size,
ERR_FAIL_COND_V(!p_buffer || p_size < 1, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(!multiplayer, ERR_UNCONFIGURED);
ERR_FAIL_COND_V(!multiplayer->has_multiplayer_peer(), ERR_UNCONFIGURED);
+
+#ifdef DEBUG_ENABLED
+ multiplayer->profile_bandwidth("out", p_size);
+#endif
+
Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
peer->set_target_peer(p_peer);
peer->set_transfer_channel(0);