1 Commits

3 changed files with 22 additions and 4 deletions

View File

@@ -6,9 +6,10 @@
#include "GameLiftClpTypes.h"
#include "GameLift/GameLiftClp.h"
#include "openssl/sha.h"
#include "GameLiftServerSDK.h"
#include "GameLiftServerSDKModels.h"
#if WITH_GAMELIFT
#include "GameLiftServerSDK.h"
#endif
DEFINE_LOG_CATEGORY(LogShooterGameMode);
@@ -23,7 +24,18 @@ void AShooterGameMode::BeginPlay()
{
Super::BeginPlay();
#if WITH_GAMELIFT
if ((GameLiftConfig.bIsAnywhereFleet && GameLiftConfig.bAllOptionsFound) ||
!GameLiftConfig.bIsAnywhereFleet)
{
InitGameLift();
}
else
{
{
UE_LOG(LogShooterGameMode, Error, TEXT("GameLift Anywhere fleet missing required options. Exiting."));
FGenericPlatformMisc::RequestExit(false);
}
}
#endif
}
@@ -330,6 +342,8 @@ void AShooterGameMode::LogAnywhereFleetParameters()
}
}
#if WITH_GAMELIFT
void AShooterGameMode::LogServerParameters(const FServerParameters& InServerParameters)
{
@@ -360,6 +374,8 @@ void AShooterGameMode::LogServerParameters(const FServerParameters& InServerPara
}
}
#endif
FString AShooterGameMode::GetValueOrHash(const FString& Value)
{
#if UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT

View File

@@ -88,7 +88,7 @@ FPortResult cmdlineparser::details::GetConfiguredOrDefaultPort(const FString& Co
}
}
PortResult.bUsedDefaultPort = true;
PortResult.WarningMessage = FString("Command Line Option for Port is out of ranged... Using Default Port %s", PortResult.Port);
PortResult.WarningMessage = FString::Printf(TEXT("Command Line Option for Port is out of ranged... Using Default Port %d"), PortResult.Port);
return PortResult;
}

View File

@@ -49,7 +49,9 @@ private:
bool GetAnywhereFleetParameters(const FString& CommandLineString);
void LogAnywhereFleetParameters();
#if WITH_GAMELIFT
static void LogServerParameters(const FServerParameters& InServerParameters);
#endif
static FString GetValueOrHash(const FString& Value);
TSharedPtr<FProcessParameters> ProcessParameters;