From a09f2270a80586c9fc83c62e971395b3dce4e125 Mon Sep 17 00:00:00 2001 From: copygirl Date: Tue, 26 Dec 2023 12:18:23 +0100 Subject: [PATCH] Skip local player in OnMultiplayerDisconnected --- scripts/MultiplayerManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/MultiplayerManager.cs b/scripts/MultiplayerManager.cs index eddfe18..98ad785 100644 --- a/scripts/MultiplayerManager.cs +++ b/scripts/MultiplayerManager.cs @@ -55,7 +55,7 @@ public partial class MultiplayerManager : Node { LocalPlayer.Name = "Local"; foreach (var player in Players.GetChildren().Cast()) - OnPeerDisconnected(player.PeerId); + if (!player.IsLocal) OnPeerDisconnected(player.PeerId); Multiplayer.MultiplayerPeer.Close(); Multiplayer.MultiplayerPeer = null; }