This issue has been discussed in various threads, but I seem to be confused why I’m getting this warning for my particular application.
I am getting this warning:
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor X1_BP_C_1. Function SetCombatState will not be processed.
I have the following functions called on the CLIENT side:
void AShooterCharacter::StartFireTimer()
{
CombatState = ECombatState::ECS_FireTimerInProgress;
SetCombatState(ECombatState::ECS_FireTimerInProgress);
GetWorldTimerManager().SetTimer(AutoFireTimer, this, &AShooterCharacter::AutoFireReset, 3.f);
}
void AShooterCharacter::AutoFireReset()
{
CombatState = ECombatState::ECS_Unoccupied;
SetCombatState(ECombatState::ECS_Unoccupied);
}
- CombatState is a replicated variable
- SetCombatState is a SERVER RPC (which sets the CombatState to all other clients)
Now here is what’s happening. When the StartFireTimer()
function is called, there is no ‘No owning connection for actor’ warning for the first RPC. However, when second RPC is called in AutoFireReset()
, the warning appears. What’s even stranger is that even though the warning appears for the second RPC, the RPC still runs successfully anyway.
Note that I am possessing the actor in the PlayerController on the SERVER (which I believe sets the owner correctly).
So what is going on here?