What's the difference between COND_SkipOwner and COND_SimulatedOnly ?

What’s the difference between COND_SkipOwner and COND_SimulatedOnly ?

1 Like
  • COND_SkipOwner - This property send to every connection EXCEPT the owner
  • COND_SimulatedOnly - This property will only send to simulated actors

But it looks like simulated actors = all actors except owner (owning client = autonomous proxy). So it looks like COND_SimulatedOnly = COND_SkipOwner. I suspect I miss something, but don’t know what exactly.

5 Likes

Since I got the ‘Most visited link’ notification, I was looking at the code to give a better answer than my previous one.

Firstly, you are completely right.

I believe it is to make the programmer’s intention explicit.
The documentation says:

ROLE_AutonomousProxy

This is generally only used on actors that are possessed by PlayerControllers. This just means that this actor is receiving inputs from a human controller, so when we extrapolate, we have a bit more information, and can use actual human inputs to fill in the missing info (rather than extrapolating based on the last known velocity).

And:

The Actor is a remote proxy, that is capable of performing some functions locally, but receives corrections from an authoritative Actor. Autonomous Proxy is usually reserved for Actors under the direct control of a player, like Pawns.

In which case could this be used? I didn’t think about it but even if ROLE_AutonomousProxy was used on another actor that is not controlled by the Player Controller there would be no problem.

The definitions in the code:

// Owned by connection's player?
UNetConnection* OwningConnection = Actor->GetNetConnection();
RepFlags.bNetOwner = (OwningConnection == Connection || (OwningConnection != nullptr && OwningConnection->IsA(UChildConnection::StaticClass()) && ((UChildConnection*)OwningConnection)->Parent == Connection));

RepFlags.bNetSimulated	= (Actor->GetRemoteRole() == ROLE_SimulatedProxy);