Checking in Unreal Engine source. Also some work on LuprexServer
This commit is contained in:
@@ -36,10 +36,6 @@ ALuprexGameModeBase::ALuprexGameModeBase()
|
||||
ResetToInitialState();
|
||||
OnWorldPreActorTickHandle = FWorldDelegates::OnWorldPreActorTick.AddUObject(this, &ALuprexGameModeBase::OnWorldPreActorTick);
|
||||
OnWorldPostActorTickHandle = FWorldDelegates::OnWorldPostActorTick.AddUObject(this, &ALuprexGameModeBase::OnWorldPostActorTick);
|
||||
|
||||
FString LuprexServer;
|
||||
FParse::Value(FCommandLine::Get(), TEXT("-LuprexServer="), LuprexServer);
|
||||
UE_LOG(LogTemp, Display, TEXT("LuprexServer = %s"), *LuprexServer)
|
||||
}
|
||||
|
||||
ALuprexGameModeBase::~ALuprexGameModeBase()
|
||||
@@ -317,6 +313,19 @@ void ALuprexGameModeBase::InitializeGlobalState()
|
||||
}
|
||||
}
|
||||
|
||||
// Possibly tell the engine to connect to a server.
|
||||
if (Playing) {
|
||||
FString LuprexServer;
|
||||
FParse::Value(FCommandLine::Get(), TEXT("-LuprexServer="), LuprexServer);
|
||||
LuprexServer = LuprexServer.ToLower();
|
||||
UE_LOG(LogTemp, Display, TEXT("LuprexServer = %s"), *LuprexServer)
|
||||
if (LuprexServer != TEXT("standalone"))
|
||||
{
|
||||
FTCHARToUTF8 utf8server(LuprexServer);
|
||||
w->play_access(w.Get(), AccessKind::CONNECT_TO_SERVER, 0, utf8server.Length(), utf8server.Get(), nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
// If we successfully created a luprex engine, create a socket system and a worker thread.
|
||||
if (Playing) {
|
||||
Sockets.Reset(FlxSockets::Create(w));
|
||||
|
||||
Reference in New Issue
Block a user