From 743be7b684a007e9db2a7db90e269ec7ba65f548 Mon Sep 17 00:00:00 2001 From: DeusVexus <10972000+DeusVexus@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:38:02 -0700 Subject: [PATCH] Adds the easy Quick Put Away (QPA) cheat (#3268) * Adds an easy qpa cheat that gives the glitched damage value of the quick put away glitch * Adds RegisterEzQPA(); under InitMods() --- soh/soh/Enhancements/mods.cpp | 14 ++++++++++++++ soh/soh/Enhancements/presets.h | 1 + soh/soh/SohMenuBar.cpp | 2 ++ 3 files changed, 17 insertions(+) diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index d23c5609e..2cab1a754 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -147,6 +147,19 @@ void RegisterInfiniteISG() { }); } +//Permanent quick put away (QPA) glitched damage value +void RegisterEzQPA() { + GameInteractor::Instance->RegisterGameHook([]() { + if (!gPlayState) return; + + if (CVarGetInteger("gEzQPA", 0) != 0) { + Player* player = GET_PLAYER(gPlayState); + player->meleeWeaponQuads[0].info.toucher.dmgFlags = 0x16171617; + player->meleeWeaponQuads[1].info.toucher.dmgFlags = 0x16171617; + } + }); +} + void RegisterUnrestrictedItems() { GameInteractor::Instance->RegisterGameHook([]() { if (!gPlayState) return; @@ -1027,6 +1040,7 @@ void InitMods() { RegisterInfiniteNayrusLove(); RegisterMoonJumpOnL(); RegisterInfiniteISG(); + RegisterEzQPA(); RegisterUnrestrictedItems(); RegisterFreezeTime(); RegisterSwitchAge(); diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index 6afc36248..ddbee3871 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -246,6 +246,7 @@ const std::vector cheatCvars = { "gMoonJumpOnL", "gSuperTunic", "gEzISG", + "gEzQPA", "gTimelessEquipment", "gCheatEasyPauseBufferEnabled", "gCheatEasyInputBufferingEnabled", diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index 04f25d2e8..018b05fe9 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -1243,6 +1243,8 @@ void DrawCheatsMenu() { UIWidgets::Tooltip("Makes every tunic have the effects of every other tunic"); UIWidgets::PaddedEnhancementCheckbox("Easy ISG", "gEzISG", true, false); UIWidgets::Tooltip("Passive Infinite Sword Glitch\nIt makes your sword's swing effect and hitbox stay active indefinitely"); + UIWidgets::PaddedEnhancementCheckbox("Easy QPA", "gEzQPA", true, false); + UIWidgets::Tooltip("Gives you the glitched damage value of the quick put away glitch."); UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", "gTimelessEquipment", true, false); UIWidgets::Tooltip("Allows any item to be equipped, regardless of age\nAlso allows Child to use Adult strength upgrades"); UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", "gCheatEasyPauseBufferEnabled", true, false);