diff --git a/soh/soh/Enhancements/DisableSandstorm.cpp b/soh/soh/Enhancements/DisableSandstorm.cpp new file mode 100644 index 000000000..a13fd4fb5 --- /dev/null +++ b/soh/soh/Enhancements/DisableSandstorm.cpp @@ -0,0 +1,16 @@ +#include "soh/Enhancements/game-interactor/GameInteractor.h" +#include "soh/ShipInit.hpp" + +extern "C" PlayState* gPlayState; + +void DisableSandstormAfterTransition(int16_t sceneNum) { + if (sceneNum == SCENE_HAUNTED_WASTELAND) { + gPlayState->envCtx.sandstormState = SANDSTORM_OFF; + } +} + +void RegisterDisableSandstorm() { + COND_HOOK(OnTransitionEnd, CVarGetInteger(CVAR_CHEAT("DisableSandstorm"), 0), DisableSandstormAfterTransition); +} + +static RegisterShipInitFunc initFunc(RegisterDisableSandstorm, { CVAR_CHEAT("DisableSandstorm") }); diff --git a/soh/soh/SohGui/SohMenuEnhancements.cpp b/soh/soh/SohGui/SohMenuEnhancements.cpp index 2f37291af..2b660fb94 100644 --- a/soh/soh/SohGui/SohMenuEnhancements.cpp +++ b/soh/soh/SohGui/SohMenuEnhancements.cpp @@ -1746,6 +1746,9 @@ void SohMenu::AddMenuEnhancements() { .Options(CheckboxOptions().Tooltip( "Keese and Guay no longer target you and simply ignore you as if you were wearing the " "Skull Mask.")); + AddWidget(path, "Disable Haunted Wasteland Sandstorm", WIDGET_CVAR_CHECKBOX) + .CVar(CVAR_CHEAT("DisableSandstorm")) + .Options(CheckboxOptions().Tooltip("Disables sandstorm effect in Haunted Wasteland.")); AddWidget(path, "Glitch Aids", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Easy Frame Advancing with Pause", WIDGET_CVAR_CHECKBOX)