[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
2 changed files with 7 additions and 1 deletions
@@ -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;