The problem is that I think at these ROLEs ONLY as constants. I see there's a variable "role" that, thanks to one of these ROLEs, gives a symbolic role to the actor.Wormbo wrote:Replication is a tricky thing and understanding network roles of actors is part of mastering replication. Try reading some replication articles again carefully. It's all mentioned in most of them, but you need to get used to the specific wording before you can fully understand the consequences of each detail the various articles.
Generally, a network client swaps Role and RemoteRole of any actors it received. Role is the role an actor has locally, RemoteRole is the role the actor has on the other side of the virtual replication channel. A server always has ROLE_Authority where it was originally created and some role less than ROLE_Authority, i.e. ROLE_AutonomousProxy, ROLE_SimulatedProxy, ROLE_DumbProxy or even ROLE_None for non-replicated mapper-placed static/no-delete actors.
No not confuse roles with network modes. An Unreal Engine instance can run in any of four modes: NM_Standalone (no networking), NM_DedicatedServer (just the server side, no local "viewport", i.e. window to view the action), NM_ListenServer (a network server with a local viewport) and NM_Client (only a network client). The first three will usually only have Role==ROLE_Authority actors, while the last one will usually have mostly Role<ROLE_Authority actors, except for those spawned locally.
Replication conditions tell about the "source side" of the replication channel. A condition has to be true on the server for variables or function calls to be replicated to the client, while it has to be true on the (owning) client for function calls to be replicated to the server.
This all has been documented in various (but usually good) detail in the many replication articles and tutorials out there, but it really takes time to understand. Allow yourself that time to let the concepts settle in your mind.
To express a symbolic idea like this one, inside a code, you need to use them as constants/variables checking them or modifying them, but, usually, programmers put enough documentation next to these constants, cause they represent a symbolic idea. But what I see here is that there is not so much documentation, I read
Code: Select all
ROLE_DumbProxy; // Dumb proxy of this actor.
You know what? Nvm, I just saw them as names, but I didn't translate them in my mind .o. Now I understand what proxy means, it means like a clone, right?