summaryrefslogtreecommitdiff
path: root/modules/multiplayer/scene_multiplayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/multiplayer/scene_multiplayer.h')
-rw-r--r--modules/multiplayer/scene_multiplayer.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/multiplayer/scene_multiplayer.h b/modules/multiplayer/scene_multiplayer.h
index b0ecc48f8c..da8c762134 100644
--- a/modules/multiplayer/scene_multiplayer.h
+++ b/modules/multiplayer/scene_multiplayer.h
@@ -103,6 +103,15 @@ private:
Ref<SceneReplicationInterface> replicator;
Ref<SceneRPCInterface> rpc;
+#ifdef DEBUG_ENABLED
+ _FORCE_INLINE_ void _profile_bandwidth(const String &p_what, int p_value);
+ _FORCE_INLINE_ Error _send(const uint8_t *p_packet, int p_packet_len); // Also profiles.
+#else
+ _FORCE_INLINE_ Error _send(const uint8_t *p_packet, int p_packet_len) {
+ return multiplayer_peer->put_packet(p_packet, p_packet_len);
+ }
+#endif
+
protected:
static void _bind_methods();
@@ -163,10 +172,6 @@ public:
Ref<SceneCacheInterface> get_path_cache() { return cache; }
-#ifdef DEBUG_ENABLED
- void profile_bandwidth(const String &p_inout, int p_size);
-#endif
-
SceneMultiplayer();
~SceneMultiplayer();
};