Skip to content

Commit

Permalink
update bonus pp to match osu!
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunyoku committed Apr 1, 2024
1 parent ecb4821 commit 4f15a9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn calculate_new_pp(scores: &Vec<RippleScore>, score_count: i32) -> i32 {
}

// bonus pp
total_pp += 416.6667 * (1.0 - 0.9994_f32.powi(score_count as i32));
total_pp += 416.6667 * (1.0 - 0.995_f32.powi(score_count as i32));

total_pp.round() as i32
}
Expand Down Expand Up @@ -399,7 +399,7 @@ async fn recalculate_user(

let score_count: i32 = sqlx::query_scalar(
&format!(
"SELECT COUNT(s.id) FROM {} s INNER JOIN beatmaps USING(beatmap_md5) WHERE userid = ? AND completed = 3 AND play_mode = ? AND ranked IN (3, 2) LIMIT 25397",
"SELECT COUNT(s.id) FROM {} s INNER JOIN beatmaps USING(beatmap_md5) WHERE userid = ? AND completed = 3 AND play_mode = ? AND ranked IN (3, 2) LIMIT 1000",
scores_table
)
)
Expand Down
6 changes: 3 additions & 3 deletions src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ use conceptual_rework::{
GameMode as ConceptualGameMode,
};
use cursordance::Beatmap as CdBeatmap;
use no_accuracy::Beatmap as NoAccuracyBeatmap;
use skill_rebalance::{
Beatmap as SkillRebalanceBeatmap, BeatmapExt as SkillRebalanceBeatmapExt,
GameMode as SkillRebalanceGameMode,
};
use woot_precision::Beatmap as WootBeatmap;
use no_accuracy::Beatmap as NoAccuracyBeatmap;

fn round(x: f32, decimals: u32) -> f32 {
let y = 10i32.pow(decimals) as f32;
Expand Down Expand Up @@ -202,7 +202,7 @@ fn calculate_new_pp(scores: &Vec<ReworkScore>, score_count: i32) -> i32 {
}

// bonus pp
total_pp += 416.6667 * (1.0 - 0.9994_f32.powi(score_count as i32));
total_pp += 416.6667 * (1.0 - 0.995_f32.powi(score_count as i32));

total_pp.round() as i32
}
Expand Down Expand Up @@ -251,7 +251,7 @@ async fn handle_queue_request(

let score_count: i32 = sqlx::query_scalar(
&format!(
"SELECT COUNT(s.id) FROM {} s INNER JOIN beatmaps USING(beatmap_md5) WHERE userid = ? AND completed = 3 AND play_mode = ? AND ranked IN (3, 2) LIMIT 25397",
"SELECT COUNT(s.id) FROM {} s INNER JOIN beatmaps USING(beatmap_md5) WHERE userid = ? AND completed = 3 AND play_mode = ? AND ranked IN (3, 2) LIMIT 1000",
scores_table
)
)
Expand Down

0 comments on commit 4f15a9c

Please sign in to comment.