[Bugfix] Add check for animation count to prevent continuing final saw textbox while putaway is happening (#3103)

* Add check for animation count to prevent continuing final saw textbox while putaway is happening.

* Added Fix toggle for it. Enabling Skip Text forces the behavior, regardless of previous selection for the Fix toggle itself (so it works if you have the Fix toggle enabled, or if you have Skip Text enabled).

* Clarified the comment in `z_en_toryo`.
This commit is contained in:
Malkierian 2023-08-06 09:01:19 -07:00 committed by GitHub
parent 63f61023d4
commit f68a4e930d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -1007,6 +1007,9 @@ void DrawEnhancementsMenu() {
ApplyAuthenticGfxPatches();
}
UIWidgets::Tooltip("Fixes authentic out of bounds texture reads, instead loading textures with the correct size");
UIWidgets::PaddedEnhancementCheckbox("Fix Poacher's Saw Softlock", "gFixSawSoftlock", true, false, CVarGetInteger("gSkipText", 0),
"This is disabled because it is forced on when Skip Text is enabled.", UIWidgets::CheckboxGraphics::Checkmark);
UIWidgets::Tooltip("Prevents the Poacher's Saw softlock from mashing through the text, or with Skip Text enabled.");
ImGui::EndMenu();
}

View File

@ -291,7 +291,10 @@ void func_80B20768(EnToryo* this, PlayState* play) {
s16 sp32;
s16 sp30;
if (this->unk_1E4 == 3) {
// Animation Count should be no more than 1 to guarantee putaway is complete after giving the saw
// As this is vanilla behavior, it only applies with the Fix toggle or Skip Text enabled.
bool checkAnim = (CVarGetInteger("gFixSawSoftlock", 0) != 0 || CVarGetInteger("gSkipText", 0) != 0) ? play->animationCtx.animationCount <= 1 : true;
if (this->unk_1E4 == 3 && checkAnim) {
Actor_ProcessTalkRequest(&this->actor, play);
Message_ContinueTextbox(play, this->actor.textId);
this->unk_1E4 = 1;