QNetworkServer.RegisterHandlerSafe

This commit is contained in:
JohnCorby 2021-12-07 19:51:11 -08:00
parent c9f4e10389
commit b9d95a16fb
2 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,7 @@ namespace QSB.Utility.VariableSync
public virtual void Awake()
{
QNetworkServer.instance.m_SimpleServerSimple.RegisterHandlerSafe(short.MaxValue, HandleVariable);
QNetworkServer.RegisterHandlerSafe(short.MaxValue, HandleVariable);
if (LocalPlayerAuthority)
{

View File

@ -615,6 +615,8 @@ namespace QuantumUNET
public static void RegisterHandler(short msgType, QNetworkMessageDelegate handler) => instance.m_SimpleServerSimple.RegisterHandler(msgType, handler);
public static void RegisterHandlerSafe(short msgType, QNetworkMessageDelegate handler) => instance.m_SimpleServerSimple.RegisterHandlerSafe(msgType, handler);
public static void UnregisterHandler(short msgType) => instance.m_SimpleServerSimple.UnregisterHandler(msgType);
public static void ClearHandlers() => instance.m_SimpleServerSimple.ClearHandlers();
@ -1348,7 +1350,7 @@ namespace QuantumUNET
private readonly HashSet<int> m_ExternalConnections;
public readonly ServerSimpleWrapper m_SimpleServerSimple;
private readonly ServerSimpleWrapper m_SimpleServerSimple;
private float m_MaxDelay = 0.1f;