This commit is contained in:
JohnCorby 2023-05-07 18:26:38 -07:00
parent fef77499c3
commit d8bfa01868

View File

@ -235,14 +235,17 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
networkAddress = QSBCore.DefaultServerIP; networkAddress = QSBCore.DefaultServerIP;
{ {
// hack kcp2k.Log.Info = s =>
kcp2k.Log.Info += s =>
{ {
DebugLog.DebugWrite("[KCP] " + s);
// hack
if (s == "KcpPeer: received disconnect message") if (s == "KcpPeer: received disconnect message")
{ {
OnClientError(TransportError.ConnectionClosed, "host disconnected"); OnClientError(TransportError.ConnectionClosed, "host disconnected");
} }
}; };
kcp2k.Log.Warning = s => DebugLog.DebugWrite("[KCP] " + s, MessageType.Warning);
kcp2k.Log.Error = s => DebugLog.DebugWrite("[KCP] " + s, MessageType.Error);
} }
QSBSceneManager.OnPostSceneLoad += (_, loadScene) => QSBSceneManager.OnPostSceneLoad += (_, loadScene) =>