Hey,
I’m not sure if I did something wrong or if there’s a bug in the engine.
As soon as a client has more than one player, it gets disconnected after seamless travel.
After some searching, I found that the client can’t connect the new PlayerController to the Local Player.
For ChildConnections, the ConnectionIdentifier of the LocalPlayer and the LocalPlayerConnectionIdentifier of the PlayerController are compared.
However, after travelling, the LocalPlayerConnectionIdentifier is always 0 on the client, and it cannot find the corresponding LocalPlayer.
I have now overwritten SwapPlayerControllers and am doing the following there:
NewPC->SetLocalPlayerConnectionIdentifier(OldPC->GetLocalPlayerConnectionIdentifier());
Super::SwapPlayerControllers(OldPC, NewPC);
If I have misunderstood something, I would appreciate any hints as to how this should actually work. On the other hand, I hope to save someone else the trouble of searching for the error.
I’m using Unreal 5.7.