Skip to content

Instantly share code, notes, and snippets.

@Nihlus
Created May 13, 2016 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nihlus/9b98a98fc0249313dbe84369e91d8b5c to your computer and use it in GitHub Desktop.
Save Nihlus/9b98a98fc0249313dbe84369e91d8b5c to your computer and use it in GitHub Desktop.
Confirmation uncertain (Action may be rejected):
Client (Instigator) calls UFUNCTION(Server, WithValidation) SomethingToHappenEverywhere();
Server receives SomethingToHappenEverywhere() -> Role == ROLE_Authority ->
Server verifies with SomethingToHappenEverywhere_Validate(); If true, continue
Server calls UFUNCTION(Multicast) SomethingToHappenEverywhere_Multicast() and does the thing;
All Clients receive SomethingToHappenEverywhere_Multicast(), verifies and does the thing.
Confirmation uncertain (Optimized):
Client (Instigator) calls UFUNCTION(Server, WithValidation) SomethingToHappenEverywhere() and does the thing;
Server receives SomethingToHappenEverywhere() -> Role == ROLE_Authority ->
Server verifies with SomethingToHappenEverywhere_Validate(); If true, continue
Server calls UFUNCTION(Multicast) SomethingToHappenEverywhere_Multicast() and does the thing;
All Clients receive SomethingToHappenEverywhere_Multicast(), verifies and does the thing.
Confirmation certain (Action will always occur - cosmetic or not important):
Client (Instigator) calls UFUNCTION(Server) SomethingToHappenEverywhere() and does the thing;
Server receives SomethingToHappenEverywhere() -> Role == ROLE_Authority ->
Server calls UFUNCTION(Multicast) SomethingToHappenEverywhere_Multicast() and does the thing;
All Clients (Except the instigator) receive SomethingToHappenEverywhere_Multicast() and do the thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment