Skip to content

Commit

Permalink
fix: prevent underflow on fails due to sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxOhn committed May 5, 2023
1 parent bd9623d commit 0c0ad34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- __Adjustments:__
- Specified clock rates can go below 0.001 again

- __Fixes:__
- Fixed underflow for osu!std scores that were FCs but quit mid-slider

# v0.9.4 (2023-02-09)

- __Additions:__
Expand Down
3 changes: 2 additions & 1 deletion src/osu/pp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ impl OsuPpInner {
if self.attrs.n_sliders > 0 {
let estimate_slider_ends_dropped =
((self.state.n100 + self.state.n50 + self.state.n_misses)
.min(self.attrs.max_combo - self.state.max_combo) as f64)
.min(self.attrs.max_combo.saturating_sub(self.state.max_combo))
as f64)
.clamp(0.0, estimate_diff_sliders);
let slider_nerf_factor = (1.0 - self.attrs.slider_factor)
* (1.0 - estimate_slider_ends_dropped / estimate_diff_sliders).powi(3)
Expand Down

0 comments on commit 0c0ad34

Please sign in to comment.