diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 0fe6f9928..3be689c4d 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -312,6 +312,9 @@ namespace GameMenuBar { CVar_SetS32("gGsCutscene", 0); // Autosave CVar_SetS32("gAutosave", 0); + + //Crit wiggle disable + CVar_SetS32("gDisableCritWiggle", 0); } void applyEnhancementPresetVanillaPlus(void) { @@ -980,6 +983,9 @@ namespace GameMenuBar { forceEnableSunLightArrows, forceEnableSunLightArrowsText, UIWidgets::CheckboxGraphics::Checkmark); UIWidgets::Tooltip("Allows Light Arrows to activate sun switches.\nMay require a room reload if toggled during gameplay."); + UIWidgets::PaddedEnhancementCheckbox("Disable Crit wiggle", "gDisableCritWiggle", true, false); + UIWidgets::Tooltip("Disable random camera wiggle at low health"); + ImGui::EndMenu(); } diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index ea3016769..2c8f7378c 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -1732,9 +1732,11 @@ s32 Camera_Normal1(Camera* camera) { } // crit wiggle - if (gSaveContext.health <= 16 && ((camera->globalCtx->state.frames % 256) == 0)) { - wiggleAdj = Rand_ZeroOne() * 10000.0f; - camera->inputDir.y = wiggleAdj + camera->inputDir.y; + if(!CVar_GetS32("gDisableCritWiggle",0)) { + if (gSaveContext.health <= 16 && ((camera->globalCtx->state.frames % 256) == 0)) { + wiggleAdj = Rand_ZeroOne() * 10000.0f; + camera->inputDir.y = wiggleAdj + camera->inputDir.y; + } } } else { anim->swing.swingUpdateRate = norm1->unk_0C;