Skip to content

Commit

Permalink
Fix lefty flip drum inputs (YARC-Official#99)
Browse files Browse the repository at this point in the history
* fixed lefty flip drum inputs

* fixed bot drum lefty flip
  • Loading branch information
santorfo authored and RileyTheFox committed Apr 15, 2023
1 parent 13e4f8f commit d8d15e2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Assets/Script/PlayMode/DrumsTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,28 @@ private void GHDrumHitAction(int drum) {
}

private void DrumHitAction(int drum, bool cymbal) {
// invert input in case lefty flip is on, bots don't need it
if (player.leftyFlip && !input.botMode){
switch (drum){
case 0:
drum = kickIndex == 4 ? 3 : 4;
break;
case 1:
drum = kickIndex == 4 ? 2 : 3;
break;
case 2:
drum = kickIndex == 4 ? 1 : 2;
break;
case 3:
drum = kickIndex == 4 ? 0 : 1;
break;
case 4:
if (kickIndex == 5){
drum = 0;
}
break;
}
}
if (drum != kickIndex) {
// Hit effect
drums[drum].Pulse();
Expand Down

0 comments on commit d8d15e2

Please sign in to comment.