From efa54ba7c8e870b5edcd1a9bfae55194e16109c7 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Fri, 26 Aug 2022 20:53:03 +0100 Subject: [PATCH] cleanup --- EpicOnlineTransport/Common.cs | 2 -- EpicOnlineTransport/Server.cs | 12 +----------- QSB/Player/Messages/PlayerKickMessage.cs | 17 ----------------- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/EpicOnlineTransport/Common.cs b/EpicOnlineTransport/Common.cs index 629a89af..0f5164c7 100644 --- a/EpicOnlineTransport/Common.cs +++ b/EpicOnlineTransport/Common.cs @@ -120,8 +120,6 @@ public abstract class Common protected void SendInternal(ProductUserId target, SocketId socketId, InternalMessages type) { - Debug.LogError($"SendInternal type:{type} to {target}"); - EOSSDKComponent.GetP2PInterface().SendPacket(new SendPacketOptions() { AllowDelayedDelivery = true, diff --git a/EpicOnlineTransport/Server.cs b/EpicOnlineTransport/Server.cs index 0339d98b..aec8f85d 100644 --- a/EpicOnlineTransport/Server.cs +++ b/EpicOnlineTransport/Server.cs @@ -67,19 +67,14 @@ public class Server : Common protected override void OnReceiveInternalData(InternalMessages type, ProductUserId clientUserId, SocketId socketId) { - Debug.LogError($"OnReceiveInteralData type:{type} from {clientUserId}"); - if (ignoreAllMessages) { - Debug.LogError($"- IgnoreAllMessages :/"); return; } switch (type) { case InternalMessages.CONNECT: - Debug.LogError($"- CONNECT connectedId:{nextConnectionID + 1}"); - if (epicToMirrorIds.Count >= maxConnections) { Debug.LogError("Reached max connections"); @@ -102,7 +97,6 @@ public class Server : Common case InternalMessages.DISCONNECT: if (epicToMirrorIds.TryGetValue(clientUserId, out var connId)) { - Debug.LogError($"- DISCONNECT connectedId:{connId}"); OnDisconnected.Invoke(connId); //CloseP2PSessionWithUser(clientUserId, socketId); epicToMirrorIds.Remove(clientUserId); @@ -148,7 +142,6 @@ public class Server : Common public void Disconnect(int connectionId) { - Debug.LogError($"DISCONNECT {connectionId}"); if (epicToMirrorIds.TryGetValue(connectionId, out var userId)) { SocketId socketId; @@ -159,7 +152,7 @@ public class Server : Common } else { - Debug.LogError("Trying to disconnect unknown connection id: " + connectionId); + Debug.LogWarning("Trying to disconnect unknown connection id: " + connectionId); } } @@ -212,11 +205,8 @@ public class Server : Common protected override void OnConnectionFailed(ProductUserId remoteId) { - Debug.LogError($"OnConnectionFailed"); - if (ignoreAllMessages) { - Debug.LogError($"- IgnoreAllMessages :/"); return; } diff --git a/QSB/Player/Messages/PlayerKickMessage.cs b/QSB/Player/Messages/PlayerKickMessage.cs index 23f83f65..3374e762 100644 --- a/QSB/Player/Messages/PlayerKickMessage.cs +++ b/QSB/Player/Messages/PlayerKickMessage.cs @@ -28,23 +28,6 @@ internal class PlayerKickMessage : QSBMessage PlayerId = reader.Read(); } - public override void OnReceiveLocal() - { - if (!QSBCore.IsHost) - { - return; - } - - Delay.RunFramesLater(10, KickPlayer); - } - - private void KickPlayer() - { - //var connectionToClient = PlayerId.GetNetworkConnection(); - //connectionToClient.Disconnect(); - //Transport.activeTransport.OnServerDisconnected(connectionToClient.connectionId); - } - public override void OnReceiveRemote() { if (PlayerId != QSBPlayerManager.LocalPlayerId)