Skip to content

Commit

Permalink
remove mysql dependency and readd comboscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
jeenyuhs committed May 28, 2024
1 parent 59d196a commit 4fe4e03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ tracing = ["rosu-map/tracing"]

[dependencies]
rosu-map = { version = "0.1.1" }
mysql = "*"

[dev-dependencies]
proptest = "1.4.0"
Expand Down
2 changes: 1 addition & 1 deletion src/osu/difficulty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl DifficultyValues {
) {
let mut aim_rating = aim_difficulty_value.sqrt() * DIFFICULTY_MULTIPLIER;
let aim_rating_no_sliders = aim_no_sliders_difficulty_value.sqrt() * DIFFICULTY_MULTIPLIER;
let mut speed_rating = speed_difficulty_value.sqrt() * DIFFICULTY_MULTIPLIER;
let speed_rating = speed_difficulty_value.sqrt() * DIFFICULTY_MULTIPLIER;
let mut flashlight_rating = flashlight_difficulty_value.sqrt() * DIFFICULTY_MULTIPLIER;

let slider_factor = if aim_rating > 0.0 {
Expand Down
4 changes: 3 additions & 1 deletion src/osu/performance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,10 @@ impl OsuPerformanceInner {
}

fn get_combo_scaling_factor(&self) -> f64 {
if self.attrs.max_combo == 0 || self.mods.rx() {
if self.attrs.max_combo == 0 {
1.0
} else if self.mods.rx() {
((f64::from(self.state.max_combo) / f64::from(self.attrs.max_combo)).log10() * 0.56 + 1.0).min(0.0).max(1.0)
} else {
(f64::from(self.state.max_combo).powf(0.8) / f64::from(self.attrs.max_combo).powf(0.8))
.min(1.0)
Expand Down

0 comments on commit 4fe4e03

Please sign in to comment.