// Oleg Petruny proprietary.

#include "CustomGameSettings.h"

#include "Kismet/GameplayStatics.h"

UCustomGameSettings::UCustomGameSettings(const FObjectInitializer& ObjectInitializer) :Super(ObjectInitializer)
{
    bUseMotionBlur = false;
    bShowFps = false;
    bMouseInverted = false;
    fMouseSensetivity = 1.0f;
}

UCustomGameSettings* UCustomGameSettings::Get()
{
    return Cast<UCustomGameSettings>(UGameUserSettings::GetGameUserSettings());
}

void UCustomGameSettings::SetMouseSensetivity(float value)
{
    fMouseSensetivity = FMath::Clamp(value, 0.1f, 2.0f);
}

float UCustomGameSettings::GetMouseSensetivity() const
{
    return fMouseSensetivity;
}