Only handle LeftButton and RightButton actions

There are definitely going to be other actions used in the future, which
would immediately cause this mod to fail. Limiting handling to
left/right buttons only is the correct way forward.
This commit is contained in:
Dean Herbert 2022-02-02 14:04:10 +09:00
parent fed63abd83
commit c7a192cc5f

View File

@ -60,9 +60,20 @@ namespace osu.Game.Rulesets.Osu.Mods
if (!introEnded)
return true;
switch (action)
{
case OsuAction.LeftButton:
case OsuAction.RightButton:
break;
// Any action which is not left or right button should be ignored.
default:
return true;
}
if (lastActionPressed != action)
{
// User alternated correctly
// User alternated correctly.
lastActionPressed = action;
return true;
}