Fix flourish sample not playing if strong hits are hit early

This commit is contained in:
Bartłomiej Dach 2023-07-08 19:22:32 +02:00
parent fee56ac6d2
commit ba0cd7a3f2
No known key found for this signature in database
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ private bool canPlayFlourish(TaikoHitObject hitObject)
if (canFlourish) if (canFlourish)
lastFlourish = h.StartTime; lastFlourish = h.StartTime;
if (h == hitObject) // hitObject can be either the strong hit itself (if hit late), or its nested strong object (if hit early)
// due to `GetMostValidObject()` idiosyncrasies.
// whichever it is, if we encounter it during iteration, stop looking.
if (h == hitObject || h.NestedHitObjects.Contains(hitObject))
return canFlourish; return canFlourish;
} }