diff --git a/osu.Game.Rulesets.Osu/Mods/OsuMod.cs b/osu.Game.Rulesets.Osu/Mods/OsuMod.cs
index 4a4ecec654..6da9bea1f2 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuMod.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuMod.cs
@@ -44,6 +44,14 @@ namespace osu.Game.Rulesets.Osu.Mods
d.ApplyCustomUpdateState += ApplyHiddenState;
}
+ protected void ApplyHiddenValues(DrawableHitObject drawable)
+ {
+ if (!(drawable is DrawableOsuHitObject d))
+ return;
+
+ d.FadeIn = preEmpt * fade_in_duration_multiplier;
+ }
+
protected void ApplyHiddenState(DrawableHitObject drawable, ArmedState state)
{
if (!(drawable is DrawableOsuHitObject d))
@@ -58,8 +66,6 @@ namespace osu.Game.Rulesets.Osu.Mods
// new duration from completed fade in to end (before fading out)
var longFadeDuration = ((d.HitObject as IHasEndTime)?.EndTime ?? d.HitObject.StartTime) - fadeOutStartTime;
- d.FadeIn = fadeInDuration;
-
switch (drawable)
{
case DrawableHitCircle circle:
diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
index af038909d2..76afd57178 100644
--- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
+++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
@@ -120,6 +120,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
State.ValueChanged += state =>
{
+ // apply any custom values
+ ApplyCustomValues?.Invoke(this);
+
UpdateState(state);
// apply any custom state overrides
@@ -250,6 +253,11 @@ namespace osu.Game.Rulesets.Objects.Drawables
nestedHitObjects.Add(h);
}
+ ///
+ /// Bind to apply custom values.
+ ///
+ public event Action ApplyCustomValues;
+
///
/// Bind to apply a custom state which can override the default implementation.
///