This commit is contained in:
Mister_Nebula 2022-08-26 20:53:03 +01:00
parent 612d219b26
commit efa54ba7c8
3 changed files with 1 additions and 30 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -28,23 +28,6 @@ internal class PlayerKickMessage : QSBMessage<string>
PlayerId = reader.Read<uint>();
}
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)