diff options
Diffstat (limited to 'modules/multiplayer/scene_multiplayer.cpp')
-rw-r--r-- | modules/multiplayer/scene_multiplayer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp index e245101eeb..dde14034e6 100644 --- a/modules/multiplayer/scene_multiplayer.cpp +++ b/modules/multiplayer/scene_multiplayer.cpp @@ -684,9 +684,9 @@ void SceneMultiplayer::_bind_methods() { SceneMultiplayer::SceneMultiplayer() { relay_buffer.instantiate(); - cache = Ref<SceneCacheInterface>(memnew(SceneCacheInterface(this))); - replicator = Ref<SceneReplicationInterface>(memnew(SceneReplicationInterface(this, cache.ptr()))); - rpc = Ref<SceneRPCInterface>(memnew(SceneRPCInterface(this, cache.ptr(), replicator.ptr()))); + cache.instantiate(this); + replicator.instantiate(this, cache.ptr()); + rpc.instantiate(this, cache.ptr(), replicator.ptr()); set_multiplayer_peer(Ref<OfflineMultiplayerPeer>(memnew(OfflineMultiplayerPeer))); } |