IApplicableToDrawableHitObjects
is inconsistent between pooled and non-pooled hit objects
#13301
Labels
IApplicableToDrawableHitObjects
is inconsistent between pooled and non-pooled hit objects
#13301
The doc comment of the interface
osu/osu.Game/Rulesets/Mods/IApplicableToDrawableHitObject.cs
Lines 14 to 19 in 8617aaa
says it is only applied to top-level DHOs.
However, when the hit object is pooled, the mod is applied to nested hit objects as well:
osu/osu.Game/Rulesets/UI/Playfield.cs
Lines 355 to 361 in a31a694
However, this behavior is already used. If I disable the mod application to nested DHOs, osu!standard hidden mod breaks (slider head remains visible).
Also, the doc comment of
IApplicableToDrawableHitObject
mentions to useNestedHitObjects
, but it cannot be used for pooled hit objects because the mod is applied beforeApply
, no nested hit objects are created for the DHO yet.Proposed solution:
ParentHitObject == null
guard can be added (soParentHitObject
has to be set before mod is applied).By the way, I think the interface should be defined as
ApplyToDrawableHitObject(DrawableHitObject)
, as every mod is using aforeach
for theIEnumerable<DrawableHitObject>
.The text was updated successfully, but these errors were encountered: