Skip local player in OnMultiplayerDisconnected

main
copygirl 11 months ago
parent f6c5ce685a
commit a09f2270a8
  1. 2
      scripts/MultiplayerManager.cs

@ -55,7 +55,7 @@ public partial class MultiplayerManager : Node
{ {
LocalPlayer.Name = "Local"; LocalPlayer.Name = "Local";
foreach (var player in Players.GetChildren().Cast<Player>()) foreach (var player in Players.GetChildren().Cast<Player>())
OnPeerDisconnected(player.PeerId); if (!player.IsLocal) OnPeerDisconnected(player.PeerId);
Multiplayer.MultiplayerPeer.Close(); Multiplayer.MultiplayerPeer.Close();
Multiplayer.MultiplayerPeer = null; Multiplayer.MultiplayerPeer = null;
} }

Loading…
Cancel
Save