Skip to content

Commit 576ac33

Browse files
authored
Merge pull request #113 from jaglitegrann/bug/missing-rpc-overloads
Add missing ClientRpc overloads for zero parameter calls.
2 parents 964958e + 675dded commit 576ac33

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,56 @@ internal void SendClientRPCPerformance(ulong hash, uint clientId, Stream message
866866

867867

868868
//BOXED CLIENT RPC
869+
public void InvokeClientRpc(string methodName, List<uint> clientIds)
870+
{
871+
SendClientRPCBoxed(HashMethodName(methodName), clientIds);
872+
}
873+
874+
public void InvokeClientRpc(Action method, List<uint> clientIds)
875+
{
876+
SendClientRPCBoxed(HashMethodName(method.Method.Name), clientIds);
877+
}
878+
879+
public void InvokeClientRpcOnOwner(Action method)
880+
{
881+
SendClientRPCBoxed(HashMethodName(method.Method.Name), OwnerClientId);
882+
}
883+
884+
public void InvokeClientRpcOnOwner(string methodName)
885+
{
886+
SendClientRPCBoxed(HashMethodName(methodName), OwnerClientId);
887+
}
888+
889+
public void InvokeClientRpcOnEveryone(Action method)
890+
{
891+
SendClientRPCBoxed(HashMethodName(method.Method.Name), null);
892+
}
893+
894+
public void InvokeClientRpcOnEveryone(string methodName)
895+
{
896+
SendClientRPCBoxed(HashMethodName(methodName), null);
897+
}
898+
899+
public void InvokeClientRpcOnClient(Action method, uint clientId)
900+
{
901+
SendClientRPCBoxed(HashMethodName(method.Method.Name), clientId);
902+
}
903+
904+
public void InvokeClientRpcOnClient(string methodName, uint clientId)
905+
{
906+
SendClientRPCBoxed(HashMethodName(methodName), clientId);
907+
}
908+
909+
public void InvokeClientRpcOnEveryoneExcept(Action method, uint clientIdToIgnore)
910+
{
911+
SendClientRPCBoxed(clientIdToIgnore, HashMethodName(method.Method.Name));
912+
}
913+
914+
public void InvokeClientRpcOnEveryoneExcept(string methodName, uint clientIdToIgnore)
915+
{
916+
SendClientRPCBoxed(clientIdToIgnore, HashMethodName(methodName));
917+
}
918+
869919
public void InvokeClientRpc<T1>(string methodName, List<uint> clientIds, T1 t1)
870920
{
871921
SendClientRPCBoxed(HashMethodName(methodName), clientIds, t1);

0 commit comments

Comments
 (0)