Fix `GameplaySampleTriggerSource` not handling rewinds correctly

This commit is contained in:
Dean Herbert 2023-07-06 14:06:40 +09:00
parent af3f9086e5
commit de74c9eb8b
1 changed files with 8 additions and 0 deletions

View File

@ -85,6 +85,14 @@ public void StopAllPlayback() => Schedule(() =>
sound.Stop();
});
protected override void Update()
{
base.Update();
if (gameplayClock?.IsRewinding == true)
mostValidObject = null;
}
protected HitObject? GetMostValidObject()
{
if (mostValidObject == null || isAlreadyHit(mostValidObject))