NetworkBehaviour.InvokeSyncEventDelegate: added missing IsInstanceOfType check that the other invokes have

This commit is contained in:
vis2k 2018-12-30 17:59:54 +01:00
parent c52e36af57
commit 0924e2f144

View File

@ -315,7 +315,8 @@ internal bool InvokeSyncEventDelegate(int cmdHash, NetworkReader reader)
{
Invoker invoker;
if (s_CmdHandlerDelegates.TryGetValue(cmdHash, out invoker) &&
invoker.invokeType == UNetInvokeType.SyncEvent)
invoker.invokeType == UNetInvokeType.SyncEvent &&
invoker.invokeClass.IsInstanceOfType(this))
{
invoker.invokeFunction(this, reader);
return true;