1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Add inline commentary about OnKilled() override

This commit is contained in:
Bartłomiej Dach 2023-07-15 18:22:04 +02:00
parent 24d63a4d96
commit 9e960894c2
No known key found for this signature in database

View File

@ -22,6 +22,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{ {
base.OnKilled(); base.OnKilled();
// usually, the strong nested hit isn't judged itself, it is judged by its parent object.
// however, in rare cases (see: drum rolls, hits with hidden active),
// it can happen that the hit window of the nested strong hit extends past the lifetime of the parent object.
// this is a safety to prevent such cases from causing the nested hit to never be judged and as such prevent gameplay from completing.
if (!Judged && Time.Current > ParentHitObject?.HitObject.GetEndTime()) if (!Judged && Time.Current > ParentHitObject?.HitObject.GetEndTime())
ApplyResult(r => r.Type = r.Judgement.MinResult); ApplyResult(r => r.Type = r.Judgement.MinResult);
} }