Thanks for the reply @jwatte.
This is not a peer to peer game; the players connect to dedicated servers.
From the looks of it the work implies fixing the uses of LocalUserNum, LocalUserIndex and whatnot. Ideally; all (or most) of these should be changed to use FPlatformUniqueId
I think you are missunderstanding the problem. The issue is not hosting the game simulation but how the systems uniquely identify the LocalPlayers; exclusively a client issue.
The various systems (attempt to) uniquely identify local players in different ways:
- By int32:Index in the GameInstance::LocalPlayers
- By int32:ControllerId (see ULocalPlayer::ControllerId and APlayerController::GetControllerId())
- By FUniqueNetId (see any and all OnlineSubsystems, et all)
- By FPlatformUniqueId (see APlayerController, IPlatformInputDeviceMapper, et all)
With that distinction some systems work correctly when a local player is removed but others dont.
Even more so in some cases you can find invalid translations like:
int32 UserIndex = PlatformUserId.GetInternalId();
int32 LocalUserNum = GetLocalUserNumFromPlatformUserId(GetPlatformUserIdFromUniqueNetId(*UniqueNetId));
With that, once the indices are invalidated, a lot of modules on the engine fail to properly identify the remaining local users.