[bug?] [Replicate] [4.14] Second Player's Pawn's RemoteRole is not replicated

Hey guys.

In my multiplay game project, only the first player’s possessed pawn’s RemoteRole variable is replicated correctly.

When the second or third player possesses to pawn, the dedicated server get correct RemoteRole(ROLE_AutonomousProxy), but client’s Role value remains ROLE_SimulatedProxy.

So non-first player’s movement and aiming input are ignored.

In versions earlier than 4.14, my project work correctly.

I think this is a bug of 4.14 version.

Because turning off net.SharedShadowState option turns it back correctly.

Please check this problem.

Thanks.

Hey kaka hoho,

I’ll need a bit more information in order to investigate the issue.

  • How are you setting up your possession of your pawn?
  • Are you spawning the pawns or do they exist in the level and get possessed at a specific time?
  • Could you please provide some screenshots of your blueprints or the code that you are using to perform this action when you’re seeing the issue occur?

•How are you setting up your possession of your pawn?

 I am just possessing it by calling Possess() on the PlayerController.

•Are you spawning the pawns or do they exist in the level and get possessed at a specific time?

 I spawn 10 AIControllers from AMyGameMode::HandleMatchIsWaitingToStart() and call RestartPlayer() to spawn Pawns. At this point, AIControllers own pawns. The possess to the PlayerController was called by the user's input during the game.

•Could you please provide some screenshots of your blueprints or the code that you are using to perform this action when you’re seeing the issue occur?

 My code is similar to ShooterGame. All that is described above. My code has been in use since version 4.5 and has worked well.

Hey guy!

I reproduced the bug with a slightly modified ThirdPerson example of 4.14 rocket version.

If you create pawns in the map without possessing them from the beginning and possess them later, it will be reproduced.

Only the pawn of the first player(Connection) can be controlled by RemoteRole being properly transmitted.

It can be reproduced as a linked project.

https://1drv.ms/u/s!AnWRKAzIQuYEgexkDAPf6hrfQjMTFw

If you turn on the dedicated server in the editor and run it with two or more clients, you can reproduce it.

Press “k” to possess and press “j” to unpossess.

If you press “k” on the non-first client to possess, the camera moves well, but you can see that the pawn’s control does not work.

Hello,

I’ve been able to reproduce your issue and have entered a bug report, which you can track here:

Thank you for your report.

Have a great day

Possibly caused by the fix for this issue, that I found in an earlier version of the engine:

Hi guys,

It appears a similar bug has popped up again in 4.24.

I have 3 pawns, and 3 active clients. On two clients - I possess two different vehicles and attach their pawns to the vehicle. On the third pawn, I move outside of the two clients replication distance. I then move back into the replication distance, and attempt to get out of the vehicle (repossessing the original pawn) and it appears the player is stuck and cannot move.

If I move back outside the replication distance, and back in again - the player pawn becomes responsive again.

This occurs only with 3 players, two works as expected.

The issue does not exist when using the ‘net.SharedShadowState 0’ option.

The issue did not occur in 4.23 and is currently occurring in 4.24.3.

Cheers