2026-02-24 22:39:26 -05:00
|
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
|
#include "ShooterGameModeBase.h"
|
|
|
|
|
|
|
|
|
|
|
|
#if WITH_GAMELIFT
|
|
|
|
|
|
#include "GameLiftServerSDK.h"
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include "ShooterGameMode.generated.h"
|
|
|
|
|
|
|
|
|
|
|
|
DECLARE_LOG_CATEGORY_EXTERN(LogShooterGameMode, Log, All);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
UCLASS()
|
|
|
|
|
|
class FPSTEMPLATE_API AShooterGameMode : public AShooterGameModeBase
|
|
|
|
|
|
{
|
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
AShooterGameMode();
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
void InitGameLift();
|
|
|
|
|
|
#if WITH_GAMELIFT
|
2026-03-01 09:29:41 -05:00
|
|
|
|
bool SetParametersFromCommandLine(FServerParameters& OutServerParameters, FProcessParameters& OutProcessParameters);
|
|
|
|
|
|
static void LogServerParameters(const FServerParameters& InServerParameters);
|
|
|
|
|
|
void SetProcessIdOnServerParameters(FServerParameters& OutServerParameters);
|
|
|
|
|
|
bool ValidateServerParameters(const FString& CommandLine, const FString& ParameterName, FString& OutValue, const bool bCritical = true);
|
|
|
|
|
|
void LogServerSummary(const FServerParameters& InServerParameters, const FProcessParameters& InProcessParameters);
|
2026-03-03 18:27:04 -05:00
|
|
|
|
void LogGameLiftServerSummary(bool bIsAnywhere, const FServerParameters& InServerParameters, const FProcessParameters& InProcessParameters);
|
2026-03-01 09:29:41 -05:00
|
|
|
|
void BindGameLiftCallbackFunctions(FProcessParameters& ProcessParameters,
|
|
|
|
|
|
FGameLiftServerSDKModule& GameLiftSdkModule);
|
|
|
|
|
|
void InitiateProcessReady(FProcessParameters& ProcessParameters, FGameLiftServerSDKModule& GameLiftSdkModule);
|
|
|
|
|
|
bool InitiateConnectionWithGameLiftAgent(FServerParameters& ServerParameters,
|
|
|
|
|
|
FGameLiftServerSDKModule& GameLiftSdkModule);
|
2026-02-24 22:39:26 -05:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
};
|