I’ve got a character with this in its Tick() function:
if (HasAuthority())
{
UE_LOG(LogTemp, Warning, TEXT("server local %s"), *UEnum::GetValueAsString(GetLocalRole()));
UE_LOG(LogTemp, Warning, TEXT("server remote %s"), *UEnum::GetValueAsString(GetRemoteRole()));
} else
{
UE_LOG(LogTemp, Warning, TEXT("client local %s"), *UEnum::GetValueAsString(GetLocalRole()));
UE_LOG(LogTemp, Warning, TEXT("client remote %s"), *UEnum::GetValueAsString(GetRemoteRole()));
}
In the logs I see this:
LogTemp: Warning: server local ROLE_Authority
LogTemp: Warning: server remote ROLE_AutonomousProxy
LogTemp: Warning: client local ROLE_SimulatedProxy
LogTemp: Warning: client remote ROLE_Authority
The character is not in the level at the start. There is a PlayerStart object in the level, and the Game Mode is the one spawning this character via Default Pawn Class.
The character has bReplicates = true in its constructor.
How is it that the server thinks the client is an autonomous proxy, but the client thinks it’s a simulated proxy? What I’m I missing in my setup that could cause this?