Description

UWorld::AttemptDeriveFromPlayInSettings() is returning NM_Dedicated server when Use Single Process is disabled in the play settings and the Editor Multiplayer Mode is set to Play as Listen Server.

It is expected that it would return NM_ListenServer.

Steps to Reproduce
  1. Open the editor
  2. Navigate to World.cpp and log a message in the following:
    case EPlayNetMode::PIE_ListenServer:
    {
    
    	bool bDedicatedServer = false;
    	PlayInSettings->GetPlayNetDedicated(bDedicatedServer);
    
    	if(bDedicatedServer == true)
    		{
    			//Add this line
                            UE_LOG(LogTemp, Warning, TEXT("NM_DedicatedServer"));
    
    			return NM_DedicatedServer;
    		}
    }
  3. Build the engine
  4. Open a new project
  5. Under the Play Settings, set Run Dedicated Server to True
  6. Under Advanced Play Settings, set Use Single Process to false, and set the Editor Multiplayer Mode to Play As Listen Server
  7. Play with 2 players

Result: Check the log and notice that the if(bDedicatedServer == true) check succeeded

Expected: Since you have overridden the Play Mode to be Play as Listen Server, it would ignore the Run Dedicated Server option

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-44504 in the post.

1
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.154.16
Target Fix4.25.3
CreatedApr 28, 2017
ResolvedFeb 3, 2021
UpdatedFeb 11, 2021