To determine what features a player is exposed to, I set a boolean for whether the player is the host:
The game mode queries the player controllers and sets said bool by querying IsNetMode(NM_ListenServer)
(Similar to GetNetMode() == ENetMode::NM_ListenServer)
.
One client hosts with /Game/Maps/MyLevel?listen
and another client joins with param 192.168.1.10
as I’m testing locally, so e.g: "UE4Editor.exe MyProject.uproject 192.168.1.10:8888 -game -log"
.
The first client correctly returns NM_ListenServer
, however the second client is not an NM_Client
, it’s also a NM_ListenServer
when calling IsNetMode
.
When calling AMyPlayerController::HasAuthority
from my game mode, it seems to return TRUE
for both clients as well. Note: this was called on a player controller queried from GetWorld()->GetPlayerControllerIterator()
.
Any suggestion is much appreciated!