Add method to toggle visual effects

This commit is contained in:
2026-04-05 18:20:25 +02:00
parent bc4f725a8f
commit 7c872dd4c5
2 changed files with 23 additions and 0 deletions

View File

@@ -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;

View File

@@ -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);
/**