disable crit wiggle (#1629)

* disable crit wiggle

* Set to zero in default preset
This commit is contained in:
louist103 2022-09-28 20:27:07 -04:00 committed by GitHub
parent 08915e5684
commit dc3c0dd9c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -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();
}

View File

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