From bd8380db5534af18fb4fab76daac77ef420becb4 Mon Sep 17 00:00:00 2001 From: Max Hilbrunner Date: Sun, 25 Feb 2024 18:44:02 +0100 Subject: [PATCH] Fix removing connected peer during disconnection --- modules/multiplayer/scene_multiplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp index 6f7a3493a15..99aba680cc5 100644 --- a/modules/multiplayer/scene_multiplayer.cpp +++ b/modules/multiplayer/scene_multiplayer.cpp @@ -428,7 +428,7 @@ void SceneMultiplayer::disconnect_peer(int p_id) { if (pending_peers.has(p_id)) { pending_peers.erase(p_id); } else if (connected_peers.has(p_id)) { - connected_peers.has(p_id); + connected_peers.erase(p_id); } multiplayer_peer->disconnect_peer(p_id); }