mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 11:12:57 +08:00
Merge pull request #7855 from peppy/fix-transform-mod
Fix transform mod not being applied correctly
This commit is contained in:
commit
4a1950ec93
@ -8,6 +8,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
@ -27,7 +28,20 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
|
||||
{
|
||||
foreach (var drawable in drawables)
|
||||
drawable.ApplyCustomUpdateState += applyTransform;
|
||||
}
|
||||
|
||||
private void applyTransform(DrawableHitObject drawable, ArmedState state)
|
||||
{
|
||||
switch (drawable)
|
||||
{
|
||||
case DrawableSliderHead _:
|
||||
case DrawableSliderTail _:
|
||||
case DrawableSliderTick _:
|
||||
case DrawableRepeatPoint _:
|
||||
return;
|
||||
|
||||
default:
|
||||
var hitObject = (OsuHitObject)drawable.HitObject;
|
||||
|
||||
float appearDistance = (float)(hitObject.TimePreempt - hitObject.TimeFadeIn) / 2;
|
||||
@ -47,6 +61,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
}
|
||||
|
||||
theta += (float)hitObject.TimeFadeIn / 1000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user