Skip to content

Method rpc annotation can define a Target Client parameter - #102

Open
TheDavSmasher wants to merge 5 commits into
NuclearPowered:masterfrom
TheDavSmasher:method-rpc-target-client
Open

Method rpc annotation can define a Target Client parameter#102
TheDavSmasher wants to merge 5 commits into
NuclearPowered:masterfrom
TheDavSmasher:method-rpc-target-client

Conversation

@TheDavSmasher

Copy link
Copy Markdown

Expands the existing MethodRpc annotation so a parameter of the method it is annotating can be assigned to mark the "TargetClientId" that SendRpcImmediately uses to not broadcast rpc to all.

@miniduikboot miniduikboot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a piece of example code to Reactor.Example that uses a targeted RPC?

Comment thread Reactor/Networking/Attributes/MethodRpcAttribute.cs
il.Emit(OpCodes.Stelem_Ref);
}

if (targetClientIndex >= 0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: review this IL code, as I'm not familiar with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants