mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 15:57:24 +08:00
Attempt to position DrawableOsuJudgement based on its DrawableOsuHitObject instead of DrawableOsuHitObject.HitObject
This commit is contained in:
parent
beee76d64a
commit
331f1f31b0
@ -82,9 +82,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, clock.ElapsedFrameTime);
|
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, clock.ElapsedFrameTime);
|
||||||
|
|
||||||
// I added these two lines
|
// I added these two lines
|
||||||
if (hitObject is DrawableOsuHitObject h)
|
/*if (hitObject is DrawableOsuHitObject h)
|
||||||
h.HitObject.Position = new Vector2(x, y);
|
h.HitObject.Position = new Vector2(x, y);
|
||||||
|
*/
|
||||||
hitObject.Position = new Vector2(x, y);
|
hitObject.Position = new Vector2(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Lighting.ResetAnimation();
|
Lighting.ResetAnimation();
|
||||||
Lighting.SetColourFrom(JudgedObject, Result);
|
Lighting.SetColourFrom(JudgedObject, Result);
|
||||||
|
|
||||||
if (JudgedObject?.HitObject is OsuHitObject osuObject)
|
if (JudgedObject is DrawableOsuHitObject osuObject)
|
||||||
{
|
{
|
||||||
Position = osuObject.StackedEndPosition;
|
Position = osuObject.ToSpaceOfOtherDrawable(Vector2.Zero, Parent);
|
||||||
Scale = new Vector2(osuObject.Scale);
|
// Works only for normal hit circles, also with magnetised:
|
||||||
|
// Position = osuObject.Position;
|
||||||
|
|
||||||
|
Scale = new Vector2(osuObject.HitObject.Scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
public const float DEFAULT_TICK_SIZE = 16;
|
public const float DEFAULT_TICK_SIZE = 16;
|
||||||
|
|
||||||
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
public DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
||||||
|
|
||||||
private SkinnableDrawable scaleContainer;
|
private SkinnableDrawable scaleContainer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user