mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
syntax
This commit is contained in:
parent
308e995ad5
commit
0aa70d8e61
@ -80,22 +80,16 @@ internal static int RegisterDelegate(Type invokeClass, string functionFullName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// pass full function name to avoid ClassA.Func <-> ClassB.Func collisions
|
// pass full function name to avoid ClassA.Func <-> ClassB.Func collisions
|
||||||
public static void RegisterCommandDelegate(Type invokeClass, string functionFullName, RemoteCallDelegate func, bool requiresAuthority)
|
public static void RegisterCommandDelegate(Type invokeClass, string functionFullName, RemoteCallDelegate func, bool requiresAuthority) =>
|
||||||
{
|
|
||||||
RegisterDelegate(invokeClass, functionFullName, RemoteCallType.Command, func, requiresAuthority);
|
RegisterDelegate(invokeClass, functionFullName, RemoteCallType.Command, func, requiresAuthority);
|
||||||
}
|
|
||||||
|
|
||||||
// pass full function name to avoid ClassA.Func <-> ClassB.Func collisions
|
// pass full function name to avoid ClassA.Func <-> ClassB.Func collisions
|
||||||
public static void RegisterRpcDelegate(Type invokeClass, string functionFullName, RemoteCallDelegate func)
|
public static void RegisterRpcDelegate(Type invokeClass, string functionFullName, RemoteCallDelegate func) =>
|
||||||
{
|
|
||||||
RegisterDelegate(invokeClass, functionFullName, RemoteCallType.ClientRpc, func);
|
RegisterDelegate(invokeClass, functionFullName, RemoteCallType.ClientRpc, func);
|
||||||
}
|
|
||||||
|
|
||||||
// to clean up tests
|
// to clean up tests
|
||||||
internal static void RemoveDelegate(int hash)
|
internal static void RemoveDelegate(int hash) =>
|
||||||
{
|
|
||||||
remoteCallDelegates.Remove(hash);
|
remoteCallDelegates.Remove(hash);
|
||||||
}
|
|
||||||
|
|
||||||
// note: no need to throw an error if not found.
|
// note: no need to throw an error if not found.
|
||||||
// an attacker might just try to call a cmd with an rpc's hash etc.
|
// an attacker might just try to call a cmd with an rpc's hash etc.
|
||||||
|
Loading…
Reference in New Issue
Block a user