Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make judgements follow hitcircles and enable them in magnetised, repel and depth #27977

Merged
merged 11 commits into from
May 30, 2024
Merged
3 changes: 1 addition & 2 deletions osu.Game.Rulesets.Osu/Mods/OsuModDepth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ public class OsuModDepth : ModWithVisibilityAdjustment, IUpdatableByPlayfield, I

public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
{
// Hide judgment displays and follow points as they won't make any sense.
// Hide follow points as they won't make any sense.
// Judgements can potentially be turned on in a future where they display at a position relative to their drawable counterpart.
drawableRuleset.Playfield.DisplayJudgements.Value = false;
(drawableRuleset.Playfield as OsuPlayfield)?.FollowPoints.Hide();
}

Expand Down
3 changes: 1 addition & 2 deletions osu.Game.Rulesets.Osu/Mods/OsuModMagnetised.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ internal class OsuModMagnetised : Mod, IUpdatableByPlayfield, IApplicableToDrawa

public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
{
// Hide judgment displays and follow points as they won't make any sense.
// Hide follow points as they won't make any sense.
// Judgements can potentially be turned on in a future where they display at a position relative to their drawable counterpart.
drawableRuleset.Playfield.DisplayJudgements.Value = false;
(drawableRuleset.Playfield as OsuPlayfield)?.FollowPoints.Hide();
}

Expand Down
3 changes: 1 addition & 2 deletions osu.Game.Rulesets.Osu/Mods/OsuModRepel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ internal class OsuModRepel : Mod, IUpdatableByPlayfield, IApplicableToDrawableRu

public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
{
// Hide judgment displays and follow points as they won't make any sense.
// Hide follow points as they won't make any sense.
// Judgements can potentially be turned on in a future where they display at a position relative to their drawable counterpart.
drawableRuleset.Playfield.DisplayJudgements.Value = false;
(drawableRuleset.Playfield as OsuPlayfield)?.FollowPoints.Hide();
}

Expand Down
17 changes: 14 additions & 3 deletions osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,21 @@ protected override void PrepareForUse()
Lighting.ResetAnimation();
Lighting.SetColourFrom(JudgedObject, Result);

if (JudgedObject?.HitObject is OsuHitObject osuObject)
if (JudgedObject is DrawableOsuHitObject osuObject)
{
Position = osuObject.StackedEndPosition;
Scale = new Vector2(osuObject.Scale);
Position = osuObject.ToSpaceOfOtherDrawable(osuObject.OriginPosition, Parent!);
Scale = new Vector2(osuObject.HitObject.Scale);
}
}

protected override void Update()
{
base.Update();

if (JudgedObject is DrawableOsuHitObject osuObject && Parent != null && osuObject.HitObject != null)
{
Position = osuObject.ToSpaceOfOtherDrawable(osuObject.OriginPosition, Parent!);
Scale = new Vector2(osuObject.HitObject.Scale);
bdach marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public partial class DrawableSliderTick : DrawableOsuHitObject

public const float DEFAULT_TICK_SIZE = 16;

protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
public DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
bdach marked this conversation as resolved.
Show resolved Hide resolved

private SkinnableDrawable scaleContainer;

Expand Down
2 changes: 2 additions & 0 deletions osu.Game.Rulesets.Osu/Objects/Slider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ private void updateNestedPositions()

if (TailCircle != null)
TailCircle.Position = EndPosition;

// Positions of other nested hitobjects are not updated
bdach marked this conversation as resolved.
Show resolved Hide resolved
}

protected void UpdateNestedSamples()
Expand Down