mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
use if (QSBCore.UseKcpTransport)
for kcp logs
This commit is contained in:
parent
fefbbf9c7f
commit
fd04af9c96
@ -149,27 +149,25 @@ namespace QSB
|
||||
return template;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_lastTransportError = null;
|
||||
}
|
||||
|
||||
private void ConfigureNetworkManager()
|
||||
{
|
||||
networkAddress = QSBCore.DefaultServerIP;
|
||||
maxConnections = MaxConnections;
|
||||
|
||||
kcp2k.Log.Info = s => DebugLog.DebugWrite("[KCP] " + s);
|
||||
kcp2k.Log.Warning = s =>
|
||||
if (QSBCore.UseKcpTransport)
|
||||
{
|
||||
DebugLog.DebugWrite("[KCP] " + s, MessageType.Warning);
|
||||
_lastTransportError = s;
|
||||
};
|
||||
kcp2k.Log.Error = s =>
|
||||
{
|
||||
DebugLog.DebugWrite("[KCP] " + s, MessageType.Error);
|
||||
_lastTransportError = s;
|
||||
};
|
||||
kcp2k.Log.Info = s => DebugLog.DebugWrite("[KCP] " + s);
|
||||
kcp2k.Log.Warning = s =>
|
||||
{
|
||||
DebugLog.DebugWrite("[KCP] " + s, MessageType.Warning);
|
||||
_lastTransportError = s;
|
||||
};
|
||||
kcp2k.Log.Error = s =>
|
||||
{
|
||||
DebugLog.DebugWrite("[KCP] " + s, MessageType.Error);
|
||||
_lastTransportError = s;
|
||||
};
|
||||
}
|
||||
|
||||
DebugLog.DebugWrite("Network Manager ready.", MessageType.Success);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user