Skip to content

Commit

Permalink
Fix "Cancel" button not working when using "toggle" missile mode (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee authored Nov 24, 2023
1 parent 7640503 commit 807226b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions YAMS-LIB/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,9 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te
ReplaceGMLInCode(chStepControlCode, "if (kMissile && kMissilePushedSteps == 1 && global.maxmissiles > 0", "if (kMissile && kMissilePushedSteps == 1");
ReplaceGMLInCode(chStepControlCode, "if (global.currentweapon == 1 && global.missiles == 0)", "if (global.currentweapon == 1 && (global.maxmissiles == 0 || global.missiles == 0))");

// Fix weapon selection cancel with toggle
ReplaceGMLInCode(chStepControlCode, "if (kSelect && kSelectPushedSteps == 0 && global.maxmissiles > 0 && global.currentweapon != 0)", "if (kSelect && kSelectPushedSteps == 0 && (global.missiles > 0 || global.smissiles > 0 || global.pbombs > 0) && global.currentweapon != 0)");

// Fix weapon selection with hold
ReplaceGMLInCode(chStepControlCode, """
if (global.currentweapon == 0)
Expand Down

0 comments on commit 807226b

Please sign in to comment.