fix air rally swing on pad release

This commit is contained in:
minenice55 2023-10-04 11:12:33 -04:00
parent 1d68f621d8
commit cf56756267
2 changed files with 4 additions and 5 deletions

View file

@ -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

View file

@ -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");