Skip to content

Commit be9d9fa

Browse files
authored
Merge pull request #52 from swoolcock/sawblade-regression
Actually fix sawblade leniency
2 parents 4a9d9f5 + faaa285 commit be9d9fa

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

osu.Game.Rulesets.Rush/Objects/Drawables/DrawableSawblade.cs

+14-6
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,24 @@ private void updateDrawables()
6565

6666
protected override void CheckForResult(bool userTriggered, double timeOffset)
6767
{
68+
// sawblades can't be user triggered, and will not hurt the player in the leading hit windows
6869
if (userTriggered || timeOffset < 0 || AllJudged)
6970
return;
7071

71-
if (HitObject.HitWindows.ResultFor(timeOffset) != HitResult.None)
72-
return;
72+
switch (HitObject.HitWindows.ResultFor(timeOffset))
73+
{
74+
case HitResult.None:
75+
// if we've reached the trailing "none", we successfully dodged the sawblade
76+
ApplyResult(r => r.Type = HitResult.Perfect);
77+
break;
7378

74-
if (playfield.PlayerSprite.CollidesWith(HitObject))
75-
ApplyResult(r => r.Type = HitResult.Miss);
76-
else
77-
ApplyResult(r => r.Type = HitResult.Perfect);
79+
case HitResult.Miss:
80+
// sawblades only hurt the player if they collide within the trailing "miss" hit window
81+
if (playfield.PlayerSprite.CollidesWith(HitObject))
82+
ApplyResult(r => r.Type = HitResult.Miss);
83+
84+
break;
85+
}
7886
}
7987

8088
protected class Saw : CompositeDrawable

osu.Game.Rulesets.Rush/Scoring/SawbladeHitWindows.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class SawbladeHitWindows : RushHitWindows
1010
protected override DifficultyRange[] GetRanges() => new[]
1111
{
1212
new DifficultyRange(HitResult.Perfect, 20, 20, 20),
13-
new DifficultyRange(HitResult.Miss, 400, 400, 400)
13+
new DifficultyRange(HitResult.Miss, 50, 50, 50)
1414
};
1515

1616
public override bool IsHitResultAllowed(HitResult result) => result == HitResult.Perfect || result == HitResult.Miss;

0 commit comments

Comments
 (0)