From cf567562677e1dd41ff61a2e330226b2094ccda5 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Wed, 4 Oct 2023 11:12:33 -0400 Subject: [PATCH] fix air rally swing on pad release --- Assets/Scripts/Conductor.cs | 7 +++---- Assets/Scripts/Games/AirRally/AirRally.cs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Conductor.cs b/Assets/Scripts/Conductor.cs index f57e83ae1..0ec70500b 100644 --- a/Assets/Scripts/Conductor.cs +++ b/Assets/Scripts/Conductor.cs @@ -151,7 +151,7 @@ namespace HeavenStudio time = startPos; firstBeatOffset = offset; - SeekMusicToTime(startPos); + SeekMusicToTime(startPos, offset); songPosBeat = GetBeatFromSongPos(time); @@ -182,7 +182,7 @@ namespace HeavenStudio if (musicSource.clip != null && startPos < musicSource.clip.length - offset) { - SeekMusicToTime(startPos); + SeekMusicToTime(startPos, offset); double musicStartDelay = -offset - startPos; if (musicStartDelay > 0) { @@ -274,9 +274,8 @@ namespace HeavenStudio StopOnlyAudio(); } - void SeekMusicToTime(double fStartPos) + void SeekMusicToTime(double fStartPos, double offset) { - double offset = GameManager.instance.Beatmap.data.offset; if (musicSource.clip != null && fStartPos < musicSource.clip.length - offset) { // https://www.desmos.com/calculator/81ywfok6xk diff --git a/Assets/Scripts/Games/AirRally/AirRally.cs b/Assets/Scripts/Games/AirRally/AirRally.cs index 2d2ab14af..df588936f 100644 --- a/Assets/Scripts/Games/AirRally/AirRally.cs +++ b/Assets/Scripts/Games/AirRally/AirRally.cs @@ -394,7 +394,7 @@ namespace HeavenStudio.Games Baxter.DoScaledAnimationAsync("Idle", 0.5f); } } - if (PlayerInput.GetIsAction(InputAction_FlickRelease) && !IsExpectingInputNow(InputAction_FlickRelease)) + if (PlayerInput.GetIsAction(InputAction_FlickPress) && !IsExpectingInputNow(InputAction_FlickPress)) { Baxter.DoScaledAnimationAsync("Hit", 0.5f); SoundByte.PlayOneShotGame("airRally/swing");