updated osu's clockrate bugfix

mania: updated to osu's clockrate bugfix

taiko: updated to osu's clockrate bugfix

fruits: updated to osu's clockrate bugfix
This commit is contained in:
MaxOhn
2021-08-09 11:39:12 +02:00
parent dc3486201f
commit cc8c893866
12 changed files with 65 additions and 55 deletions
+3
View File
@@ -7,6 +7,7 @@ pub(crate) struct DifficultyObject<'o> {
pub(crate) last: &'o CatchObject,
pub(crate) delta: f32,
pub(crate) start_time: f32,
pub(crate) normalized_pos: f32,
pub(crate) last_normalized_pos: f32,
@@ -24,6 +25,7 @@ impl<'o> DifficultyObject<'o> {
clock_rate: f32,
) -> Self {
let delta = (base.time - last.time) / clock_rate;
let start_time = base.time / clock_rate;
let strain_time = delta.max(40.0);
let scaling_factor = NORMALIZED_HITOBJECT_RADIUS / half_catcher_width;
@@ -34,6 +36,7 @@ impl<'o> DifficultyObject<'o> {
base,
last,
delta,
start_time,
normalized_pos,
last_normalized_pos,
strain_time,
+4 -4
View File
@@ -227,7 +227,7 @@ pub fn stars(map: &Beatmap, mods: impl Mods, passed_objects: Option<usize>) -> S
while h.base.time > current_section_end {
movement.save_current_peak();
movement.start_new_section_from(current_section_end);
movement.start_new_section_from(current_section_end / attributes.clock_rate);
current_section_end += section_len;
}
@@ -247,7 +247,7 @@ pub fn stars(map: &Beatmap, mods: impl Mods, passed_objects: Option<usize>) -> S
while h.base.time > current_section_end {
movement.save_current_peak();
movement.start_new_section_from(current_section_end);
movement.start_new_section_from(current_section_end / attributes.clock_rate);
current_section_end += section_len;
}
@@ -451,7 +451,7 @@ pub fn strains(map: &Beatmap, mods: impl Mods) -> Strains {
while h.base.time > current_section_end {
movement.save_current_peak();
movement.start_new_section_from(current_section_end);
movement.start_new_section_from(current_section_end / attributes.clock_rate);
current_section_end += section_len;
}
@@ -471,7 +471,7 @@ pub fn strains(map: &Beatmap, mods: impl Mods) -> Strains {
while h.base.time > current_section_end {
movement.save_current_peak();
movement.start_new_section_from(current_section_end);
movement.start_new_section_from(current_section_end / attributes.clock_rate);
current_section_end += section_len;
}
+1 -1
View File
@@ -59,7 +59,7 @@ impl Movement {
self.current_strain *= strain_decay(current.delta);
self.current_strain += self.strain_value_of(&current) * SKILL_MULTIPLIER;
self.current_section_peak = self.current_strain.max(self.current_section_peak);
self.prev_time.replace(current.base.time);
self.prev_time.replace(current.start_time);
}
pub(crate) fn difficulty_value(&mut self) -> f32 {