mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Add network messages to lookup dict in network server replace handler (#3753)
This commit is contained in:
parent
2c603fd406
commit
1c365fc3d5
@ -928,6 +928,10 @@ public static void ReplaceHandler<T>(Action<NetworkConnectionToClient, T> handle
|
||||
where T : struct, NetworkMessage
|
||||
{
|
||||
ushort msgType = NetworkMessageId<T>.Id;
|
||||
|
||||
// register Id <> Type in lookup for debugging.
|
||||
NetworkMessages.Lookup[msgType] = typeof(T);
|
||||
|
||||
handlers[msgType] = NetworkMessages.WrapHandler(handler, requireAuthentication, exceptionsDisconnect);
|
||||
}
|
||||
|
||||
@ -936,6 +940,10 @@ public static void ReplaceHandler<T>(Action<NetworkConnectionToClient, T, int> h
|
||||
where T : struct, NetworkMessage
|
||||
{
|
||||
ushort msgType = NetworkMessageId<T>.Id;
|
||||
|
||||
// register Id <> Type in lookup for debugging.
|
||||
NetworkMessages.Lookup[msgType] = typeof(T);
|
||||
|
||||
handlers[msgType] = NetworkMessages.WrapHandler(handler, requireAuthentication, exceptionsDisconnect);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user