67 lines
1.3 KiB
C++
67 lines
1.3 KiB
C++
// 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;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class FPSTEMPLATE_API AShooterGameMode : public AShooterGameModeBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AShooterGameMode();
|
|
|
|
protected:
|
|
|
|
UPROPERTY(Config, BlueprintReadOnly)
|
|
bool bIsAnywhereFleet = false;
|
|
|
|
UPROPERTY(Config, BlueprintReadOnly)
|
|
FString FleetId;
|
|
|
|
UPROPERTY(Config, BlueprintReadOnly)
|
|
FString AuthToken;
|
|
|
|
UPROPERTY(Config, BlueprintReadOnly)
|
|
FString HostId;
|
|
|
|
UPROPERTY(Config, BlueprintReadOnly)
|
|
FString WebSocketUrl;
|
|
|
|
UPROPERTY(Config)
|
|
FString ServerRegion;
|
|
|
|
UPROPERTY(Config, BlueprintReadOnly)
|
|
int32 ServerPort;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
bool bDebugMode = false;
|
|
|
|
virtual void BeginPlay() override;
|
|
virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override;
|
|
|
|
private:
|
|
FString CachedCommandLine;
|
|
TSharedPtr<FProcessParameters> ProcessParameters;
|
|
TSharedPtr<FServerParameters> ServerParameters;
|
|
|
|
int32 GetConfiguredOrDefaultPort() const;
|
|
static FString GetSHA256Hash(const FString& Input);
|
|
|
|
#if WITH_GAMELIFT
|
|
void InitGameLift();
|
|
#endif
|
|
};
|