Skip to content

Commit

Permalink
Change relax leniency to 2 for lazer scores
Browse files Browse the repository at this point in the history
  • Loading branch information
Wieku committed Oct 23, 2024
1 parent d3b78cc commit 4614d98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/dance/input/relax.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package input

import (
"github.com/wieku/danser-go/app/beatmap/difficulty"
"github.com/wieku/danser-go/app/graphics"
"github.com/wieku/danser-go/app/rulesets/osu"
)
Expand All @@ -25,13 +26,18 @@ func (processor *RelaxInputProcessor) Update(time float64) {

click := false

leniency := 12.0
if processor.ruleset.GetPlayerDifficulty(processor.cursor).CheckModActive(difficulty.Lazer) {
leniency = 2
}

for _, o := range processed {
circle, c1 := o.(*osu.Circle)
slider, c2 := o.(*osu.Slider)

objectStartTime := processor.ruleset.GetBeatMap().HitObjects[o.GetNumber()].GetStartTime()

if ((c1 && !circle.IsHit(player)) || (c2 && !slider.IsStartHit(player))) && time > objectStartTime-12 {
if ((c1 && !circle.IsHit(player)) || (c2 && !slider.IsStartHit(player))) && time > objectStartTime-leniency {
click = true
}
}
Expand Down

0 comments on commit 4614d98

Please sign in to comment.