summaryrefslogtreecommitdiffstats
path: root/modules/multiplayer
diff options
context:
space:
mode:
authorMax Hilbrunner <m.hilbrunner@gmail.com>2024-02-25 18:44:02 +0100
committerMax Hilbrunner <m.hilbrunner@gmail.com>2024-02-25 18:44:02 +0100
commitbd8380db5534af18fb4fab76daac77ef420becb4 (patch)
tree9d3ec745655ab42de347ea710e62afbbe006be1c /modules/multiplayer
parent81f3d43cc1ba01136795fb2059bbaa55bc514a16 (diff)
downloadredot-engine-bd8380db5534af18fb4fab76daac77ef420becb4.tar.gz
Fix removing connected peer during disconnection
Diffstat (limited to 'modules/multiplayer')
-rw-r--r--modules/multiplayer/scene_multiplayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp
index 6f7a3493a1..99aba680cc 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);
}