Skip to content

Commit

Permalink
Fix None stars being broken as fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Dec 4, 2024
1 parent cac2780 commit 9b8dece
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
Expand All @@ -23,7 +22,19 @@ public partial class DrawableSlideBody : DrawableSentakkiLanedHitObject
public new SlideBody HitObject => (SlideBody)base.HitObject;

// This slide body can only be interacted with iff the slidetap associated with this slide is judged
public bool IsHittable => ParentHitObject is not null && (ParentHitObject.HitObject.TapType is Slide.TapTypeEnum.None || ParentHitObject.SlideTaps.Child.Judged);
public bool IsHittable
{
get
{
if (ParentHitObject is null)
return false;

if (ParentHitObject.HitObject.TapType is Slide.TapTypeEnum.None)
return Time.Current >= HitObject.StartTime;

return ParentHitObject.SlideTaps.Child.Judged;
}
}

public Container<DrawableSlideCheckpoint> SlideCheckpoints { get; private set; } = null!;

Expand Down Expand Up @@ -155,7 +166,7 @@ protected override void UpdateInitialTransforms()
base.UpdateInitialTransforms();
Slidepath.PerformEntryAnimation(AnimationDuration.Value);

using (BeginAbsoluteSequence(HitObject.StartTime))
using (BeginAbsoluteSequence(HitObject.StartTime - 50))
{
SlideStars[2].FadeInFromZero(HitObject.ShootDelay).ScaleTo(1.25f, HitObject.ShootDelay);
SlideStars[0].FadeOut().ScaleTo(1.25f, HitObject.ShootDelay);
Expand All @@ -167,7 +178,7 @@ protected override void UpdateInitialTransforms()
SlideStars[1].FadeInFromZero(HitObject.ShootDelay);
}

using (BeginDelayedSequence(HitObject.ShootDelay))
using (BeginDelayedSequence(50 + HitObject.ShootDelay))
{
if (!Slidepath.Path.StartsWithSlideFan && Slidepath.Path.EndsWithSlideFan)
{
Expand Down Expand Up @@ -199,7 +210,6 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
break;
}
}

if (!userTriggered)
{
if (!HitObject.HitWindows.CanBeHit(timeOffset))
Expand All @@ -210,29 +220,20 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)

// Apply a leniency if the player almost completed the slide
if (SlideCheckpoints.Count(node => !node.Result.IsHit) <= 2 && SlideCheckpoints.Count > 2)
ApplyResult(hitResult: HitResult.Ok);
ApplyResult(HitResult.Ok);
else
ApplyResult(Result.Judgement.MinResult);
}

return;
}



var result = HitObject.HitWindows.ResultFor(timeOffset);

// Give the player an OK for extremely early completion
// This is also a safegaurd for super late hits beyond the late windows, where the input may have occured prior to the late window being exceeded due to lag.
// If the slide was completed before the early windows, just give an OK result
if (result == HitResult.None)
result = HitResult.Ok;

// Give a perfect result if the star is intersecting with the last node
// This is to preserve the expected invariant that following the star perfectly should guarantee a perfect judgement.
if (timeOffset < 0)
if ((1 - StarProgress) * Slidepath.Path.TotalDistance <= DrawableSlideCheckpointNode.DETECTION_RADIUS)
result = HitResult.Perfect;

ApplyResult(result);
}

Expand Down

0 comments on commit 9b8dece

Please sign in to comment.