diff --git a/libs/UEngine/UETools.cpp b/libs/UEngine/UETools.cpp index caafe92..013d763 100644 --- a/libs/UEngine/UETools.cpp +++ b/libs/UEngine/UETools.cpp @@ -4,6 +4,13 @@ #include "Engine_classes.hpp" // Visual effects toggle +void SetAllEffectsToBeToggled() { + gPendingDOF = true; + gPendingCA = true; + gPendingVignetting = true; + gPendingFog = true; +} + void ApplyVisualEffect(GameFixes fix, bool enabled) { SDK::UWorld* world = SDK::UWorld::GetWorld(); SDK::APawn* pawn = nullptr; diff --git a/libs/UEngine/UETools.hpp b/libs/UEngine/UETools.hpp index d79a088..3538dad 100644 --- a/libs/UEngine/UETools.hpp +++ b/libs/UEngine/UETools.hpp @@ -29,8 +29,24 @@ namespace UC { class FString; } +/** + * @brief Prepare all visual effects to be toggled by pending them. + */ +void SetAllEffectsToBeToggled(); + +/** + * @brief Apply visual effect. + * @param fix - The visual effect to be applied. + * @param enabled - The effect enabled or not. + */ void ApplyVisualEffect(GameFixes fix, bool enabled); +/** + * @brief Retrieve the cvar FString command to be applied. + * @param fix - The visual effect to be applied. + * @param enabled - The effect enabled or not. + * @return The FString command to be applied or empty FString if not found. + */ UC::FString GetCommand(GameFixes fix, bool enabled); /**