summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2022-09-28 20:27:07 -0400
committerGitHub <noreply@github.com>2022-09-28 20:27:07 -0400
commitdc3c0dd9c852ae704aaa6f6f7ad7258d7076c5ec (patch)
tree5cc4640f59a9cf7559f528b0f03fe78686d5ab26
parent08915e56849f0fcbf3653155494de754ee38ff4d (diff)
disable crit wiggle (#1629)
* disable crit wiggle * Set to zero in default preset
-rw-r--r--soh/soh/GameMenuBar.cpp6
-rw-r--r--soh/src/code/z_camera.c8
2 files changed, 11 insertions, 3 deletions
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;