Skip to content

Commit

Permalink
Merge pull request #395 from LumpBloom7/Strict-slide-checkpoint-order
Browse files Browse the repository at this point in the history
Reduce slider leniencies
  • Loading branch information
LumpBloom7 authored Sep 23, 2022
2 parents 52b29ac + 7644813 commit 394cdc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
{
if (!HitObject.HitWindows.CanBeHit(timeOffset))
{
// Miss the last node to ensure that all of them have results
SlideCheckpoints[^1].ForcefullyMiss();
// Ensure that all of them have results
foreach (var checkpoint in SlideCheckpoints)
checkpoint.ForcefullyMiss();

if (SlideCheckpoints.Count(node => !node.Result.IsHit) <= 2 && SlideCheckpoints.Count > 2)
ApplyResult(HitResult.Ok);
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DrawableSlideCheckpoint : DrawableSentakkiHitObject
// All hits can only be done after the parent StartTime
public bool IsHittable => Time.Current > ParentHitObject.HitObject.StartTime && isPreviousNodeHit();

private bool isPreviousNodeHit() => ThisIndex < 2 || parentSlide.SlideCheckpoints[ThisIndex - 2].IsHit;
private bool isPreviousNodeHit() => ThisIndex < 1 || parentSlide.SlideCheckpoints[ThisIndex - 1].IsHit;

private Container<DrawableSlideCheckpointNode> nodes;

Expand Down Expand Up @@ -71,9 +71,8 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)

protected override void ApplyResult(Action<JudgementResult> application)
{
// Judge the previous node, because that isn't guaranteed due to the leniency;
if (ThisIndex > 0)
parentSlide.SlideCheckpoints[ThisIndex - 1]?.ApplyResult(application);
if (Judged)
return;

// Make sure remaining nodes are judged
foreach (var node in nodes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ public DrawableSlideCheckpointNode(SlideCheckpoint.CheckpointNode node)
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
RelativeSizeAxes = Axes.None;
Size = new Vector2(200);
Size = new Vector2(value: 150);
CornerExponent = 2f;
CornerRadius = 100;
Masking = true;
CornerRadius = 75;
}

protected override void OnApply()
Expand Down

0 comments on commit 394cdc8

Please sign in to comment.