RPC function vs RoleAuthority check?

Actually it seems to be a problem of DebugMessage which appear always everywhere.

Anyway, look at this code from ShooterGame

ab53518cd270d91996ccb14845e7d1da63f9cbbb.jpeg

If it’s not the client, call a ServerRPC function that executes on the server.

I really don’t understand why the developers didn’t just do:



if( Role < ROLE_Authority )
   return;

SetCurrentWeapon(Weapon, CurrentWeapon);