mania: scale score for pp calculation on partial plays

This commit is contained in:
MaxOhn
2021-01-18 07:59:03 +01:00
parent f11c5e0ab4
commit 1902eedf5f
4 changed files with 12 additions and 4 deletions
+8 -1
View File
@@ -76,10 +76,17 @@ impl<'m> ManiaPP<'m> {
let nf = self.mods.nf();
let ht = self.mods.ht();
let scaled_score = self.score.map_or(1_000_000.0, |score| {
let mut scaled_score = self.score.map_or(1_000_000.0, |score| {
score / 0.5_f32.powi(ez as i32 + nf as i32 + ht as i32)
});
if let Some(passed_objects) = self.passed_objects {
let percent_passed =
passed_objects as f32 / (self.map.n_circles + self.map.n_sliders) as f32;
scaled_score /= percent_passed;
}
let mut multiplier = 0.8;
if nf {
+1 -1
View File
@@ -29,7 +29,7 @@ impl BeatmapAttributes {
}
/// Adjusts attributes w.r.t. mods.
/// AR is further adjusted by the its hitwindow.
/// AR is further adjusted by its hitwindow.
/// OD is __not__ adjusted by its hitwindow.
pub fn mods(self, mods: impl Mods) -> Self {
if !mods.change_map() {
+2 -1
View File
@@ -17,7 +17,8 @@ impl HitObject {
pub fn end_time(&self) -> f32 {
match &self.kind {
HitObjectKind::Circle { .. } => self.start_time,
HitObjectKind::Slider { .. } => self.start_time, // wrong but should be unreachable
// incorrect, only called in mania which has no sliders though
HitObjectKind::Slider { .. } => self.start_time,
HitObjectKind::Spinner { end_time } => *end_time,
HitObjectKind::Hold { end_time, .. } => *end_time,
}
+1 -1
View File
@@ -1,7 +1,7 @@
use std::fmt;
use std::ops;
/// Simple (x, y) coordinate
/// Simple (x, y) coordinate / vector
#[derive(Clone, Copy, Default, PartialEq)]
pub struct Pos2 {
pub x: f32,