mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
nice hardcoded message you got there kcp
This commit is contained in:
parent
fd04af9c96
commit
b0047c9047
@ -50,6 +50,7 @@ namespace QSB
|
||||
|
||||
private string _lastTransportError;
|
||||
internal bool _intentionalDisconnect;
|
||||
private const string _kcpDisconnectMessage = "KCP: received disconnect message";
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
@ -156,7 +157,14 @@ namespace QSB
|
||||
|
||||
if (QSBCore.UseKcpTransport)
|
||||
{
|
||||
kcp2k.Log.Info = s => DebugLog.DebugWrite("[KCP] " + s);
|
||||
kcp2k.Log.Info = s =>
|
||||
{
|
||||
DebugLog.DebugWrite("[KCP] " + s);
|
||||
if (s == _kcpDisconnectMessage)
|
||||
{
|
||||
_lastTransportError = s;
|
||||
}
|
||||
};
|
||||
kcp2k.Log.Warning = s =>
|
||||
{
|
||||
DebugLog.DebugWrite("[KCP] " + s, MessageType.Warning);
|
||||
@ -264,10 +272,6 @@ namespace QSB
|
||||
_lastTransportError = null;
|
||||
_intentionalDisconnect = false;
|
||||
}
|
||||
else if (_lastTransportError == null)
|
||||
{
|
||||
_lastTransportError = "host disconnected";
|
||||
}
|
||||
|
||||
OnClientDisconnected?.SafeInvoke(_lastTransportError);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user