diff --git a/Assets/Scripts/Net/Instances/Client.cs b/Assets/Scripts/Net/Instances/Client.cs index bb62163..a9d1d1a 100644 --- a/Assets/Scripts/Net/Instances/Client.cs +++ b/Assets/Scripts/Net/Instances/Client.cs @@ -51,7 +51,6 @@ namespace NeonTea.Quakeball.Net.Instances { SelfIdentPckt ident = (SelfIdentPckt)packet; LocalPlayer.Id = ident.PlayerId; Players.Add(LocalPlayer.Id, LocalPlayer); - Debug.Log($"I got self-identified as {LocalPlayer.Id}"); SpawnPckt spawn = new SpawnPckt(); spawn.Location = LocalPlayer.Controlled.transform.position; diff --git a/Assets/Scripts/Net/Instances/Server.cs b/Assets/Scripts/Net/Instances/Server.cs index 10a1c69..bd04a4a 100644 --- a/Assets/Scripts/Net/Instances/Server.cs +++ b/Assets/Scripts/Net/Instances/Server.cs @@ -46,7 +46,6 @@ namespace NeonTea.Quakeball.Net.Instances { Players.Add(RemotePlayer.Id, RemotePlayer); SelfIdentPckt ident = new SelfIdentPckt(); ident.PlayerId = RemotePlayer.Id; - Debug.Log("Send self-ident!"); Peer.SendReliable(conn.uid, ident); } @@ -55,7 +54,6 @@ namespace NeonTea.Quakeball.Net.Instances { public override void Handle(Connection conn, Packet packet) { if (packet is SpawnPckt) { - Debug.Log("Do i ever get it"); SpawnPckt spawn = (SpawnPckt)packet; if (Players[conn.uid].Controlled == null) { GameObject obj = Net.SpawnPlayer(spawn.Location); diff --git a/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs b/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs index 40afecc..1a3fe93 100644 --- a/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs +++ b/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs @@ -210,6 +210,10 @@ namespace NeonTea.Quakeball.TeaNet.Peers { conn.Status = ConnectionStatus.Ready; ProtocolActionQueues[protocol.Identifier].Enqueue(new ConnectionChangedAction(oldStatus, conn.Status, conn)); } + if (!(oldStatus == ConnectionStatus.Establishing || oldStatus == ConnectionStatus.Ready)) { + break; // No cheating at this table! For realsies this time! + } + conn.Internal.LatestOutwardReliable = buffer.ReadInt(); List list = PacketQueue[conn.uid];