Files
DedicatedServerCourse/Source/FPSTemplate/Public/Game/ShooterGameMode.h

61 lines
1.2 KiB
C
Raw Normal View History

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"
#include "ShooterGameMode.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(LogShooterGameMode, Log, All);
struct FProcessParameters;
struct FServerParameters;
struct FGameLiftConfig
{
bool bDebugMode = false;
bool bIsAnywhereFleet = false;
bool bIsCriticalError = false;
int32 ServerPort;
FString AuthToken;
FString FleetId;
FString HostId;
FString WebSocketUrl;
FString ServerRegion;
};
enum ETokenStatus : uint8
{
Found,
NotFoundRequired,
NotFoundNotRequired
};
2026-02-24 22:39:26 -05:00
/**
*
*/
UCLASS()
class FPSTEMPLATE_API AShooterGameMode : public AShooterGameModeBase
{
GENERATED_BODY()
public:
AShooterGameMode();
protected:
2026-02-24 22:39:26 -05:00
virtual void BeginPlay() override;
virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override;
2026-02-24 22:39:26 -05:00
private:
FGameLiftConfig GameLiftConfig;
FString CachedCommandLine;
static FString GetSHA256Hash(const FString& CommandLineString);
void InitGameLift();
bool GetAnywhereFleetParameters(FString CommandLineString);
void LogAnywhereFleetParameters();
2026-02-24 22:39:26 -05:00
};