port akatsuki autopilot changes
This commit is contained in:
@@ -177,6 +177,7 @@ impl_has_mod! {
|
|||||||
dt: + DoubleTime ["DoubleTime"],
|
dt: + DoubleTime ["DoubleTime"],
|
||||||
nc: + Nightcore ["Nightcore"],
|
nc: + Nightcore ["Nightcore"],
|
||||||
ht: + HalfTime ["HalfTime"],
|
ht: + HalfTime ["HalfTime"],
|
||||||
|
ap: + Autopilot ["Autopilot"],
|
||||||
bl: - Blinds ["Blinds"],
|
bl: - Blinds ["Blinds"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,11 @@ impl DifficultyValues {
|
|||||||
flashlight_rating *= 0.7;
|
flashlight_rating *= 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if mods.ap() {
|
||||||
|
aim_rating = 0.0;
|
||||||
|
flashlight_rating *= 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
let base_aim_performance =
|
let base_aim_performance =
|
||||||
(5.0 * (aim_rating / 0.0675).max(1.0) - 4.0).powf(3.0) / 100_000.0;
|
(5.0 * (aim_rating / 0.0675).max(1.0) - 4.0).powf(3.0) / 100_000.0;
|
||||||
let base_speed_performance =
|
let base_speed_performance =
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ impl OsuSkills {
|
|||||||
|
|
||||||
let aim = Aim::new(true);
|
let aim = Aim::new(true);
|
||||||
let aim_no_sliders = Aim::new(false);
|
let aim_no_sliders = Aim::new(false);
|
||||||
let speed = Speed::new(hit_window);
|
let speed = Speed::new(hit_window, mods);
|
||||||
let flashlight = Flashlight::new(mods, scaling_factor.radius, time_preempt, time_fade_in);
|
let flashlight = Flashlight::new(mods, scaling_factor.radius, time_preempt, time_fade_in);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
osu::difficulty::object::OsuDifficultyObject,
|
osu::difficulty::object::OsuDifficultyObject,
|
||||||
util::strains_vec::StrainsVec,
|
util::strains_vec::StrainsVec,
|
||||||
|
GameMods,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::strain::OsuStrainSkill;
|
use super::strain::OsuStrainSkill;
|
||||||
@@ -23,17 +24,19 @@ pub struct Speed {
|
|||||||
curr_rhythm: f64,
|
curr_rhythm: f64,
|
||||||
object_strains: Vec<f64>,
|
object_strains: Vec<f64>,
|
||||||
hit_window: f64,
|
hit_window: f64,
|
||||||
|
has_autopilot_mod: bool,
|
||||||
inner: OsuStrainSkill,
|
inner: OsuStrainSkill,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Speed {
|
impl Speed {
|
||||||
pub fn new(hit_window: f64) -> Self {
|
pub fn new(hit_window: f64, mods: &GameMods) -> Self {
|
||||||
Self {
|
Self {
|
||||||
curr_strain: 0.0,
|
curr_strain: 0.0,
|
||||||
curr_rhythm: 0.0,
|
curr_rhythm: 0.0,
|
||||||
// mean=406.72 | median=307
|
// mean=406.72 | median=307
|
||||||
object_strains: Vec::with_capacity(256),
|
object_strains: Vec::with_capacity(256),
|
||||||
hit_window,
|
hit_window,
|
||||||
|
has_autopilot_mod: mods.ap(),
|
||||||
inner: OsuStrainSkill::default(),
|
inner: OsuStrainSkill::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,9 +127,12 @@ impl<'a> Skill<'a, Speed> {
|
|||||||
|
|
||||||
fn strain_value_at(&mut self, curr: &'a OsuDifficultyObject<'a>) -> f64 {
|
fn strain_value_at(&mut self, curr: &'a OsuDifficultyObject<'a>) -> f64 {
|
||||||
self.inner.curr_strain *= strain_decay(curr.strain_time, STRAIN_DECAY_BASE);
|
self.inner.curr_strain *= strain_decay(curr.strain_time, STRAIN_DECAY_BASE);
|
||||||
self.inner.curr_strain +=
|
self.inner.curr_strain += SpeedEvaluator::evaluate_diff_of(
|
||||||
SpeedEvaluator::evaluate_diff_of(curr, self.diff_objects, self.inner.hit_window)
|
curr,
|
||||||
* SKILL_MULTIPLIER;
|
self.diff_objects,
|
||||||
|
self.inner.hit_window,
|
||||||
|
self.inner.has_autopilot_mod,
|
||||||
|
) * SKILL_MULTIPLIER;
|
||||||
self.inner.curr_rhythm =
|
self.inner.curr_rhythm =
|
||||||
RhythmEvaluator::evaluate_diff_of(curr, self.diff_objects, self.inner.hit_window);
|
RhythmEvaluator::evaluate_diff_of(curr, self.diff_objects, self.inner.hit_window);
|
||||||
|
|
||||||
@@ -148,6 +154,7 @@ impl SpeedEvaluator {
|
|||||||
curr: &'a OsuDifficultyObject<'a>,
|
curr: &'a OsuDifficultyObject<'a>,
|
||||||
diff_objects: &'a [OsuDifficultyObject<'a>],
|
diff_objects: &'a [OsuDifficultyObject<'a>],
|
||||||
hit_window: f64,
|
hit_window: f64,
|
||||||
|
has_autopilot_mod: bool,
|
||||||
) -> f64 {
|
) -> f64 {
|
||||||
if curr.base.is_spinner() {
|
if curr.base.is_spinner() {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
@@ -185,7 +192,11 @@ impl SpeedEvaluator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let travel_dist = osu_prev_obj.map_or(0.0, |obj| obj.travel_dist);
|
let travel_dist = osu_prev_obj.map_or(0.0, |obj| obj.travel_dist);
|
||||||
let dist = Self::SINGLE_SPACING_THRESHOLD.min(travel_dist + osu_curr_obj.min_jump_dist);
|
let dist = if has_autopilot_mod {
|
||||||
|
0.0
|
||||||
|
} else {
|
||||||
|
Self::SINGLE_SPACING_THRESHOLD.min(travel_dist + osu_curr_obj.min_jump_dist)
|
||||||
|
};
|
||||||
|
|
||||||
(speed_bonus + speed_bonus * (dist / Self::SINGLE_SPACING_THRESHOLD).powf(3.5))
|
(speed_bonus + speed_bonus * (dist / Self::SINGLE_SPACING_THRESHOLD).powf(3.5))
|
||||||
* doubletapness
|
* doubletapness
|
||||||
|
|||||||
@@ -613,6 +613,10 @@ impl OsuPerformanceInner<'_> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn compute_aim_value(&self) -> f64 {
|
fn compute_aim_value(&self) -> f64 {
|
||||||
|
if self.mods.ap() {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
let mut aim_value = (5.0 * (self.attrs.aim / 0.0675).max(1.0) - 4.0).powf(3.0) / 100_000.0;
|
let mut aim_value = (5.0 * (self.attrs.aim / 0.0675).max(1.0) - 4.0).powf(3.0) / 100_000.0;
|
||||||
|
|
||||||
let total_hits = self.total_hits();
|
let total_hits = self.total_hits();
|
||||||
@@ -706,7 +710,9 @@ impl OsuPerformanceInner<'_> {
|
|||||||
|
|
||||||
speed_value *= self.get_combo_scaling_factor();
|
speed_value *= self.get_combo_scaling_factor();
|
||||||
|
|
||||||
let ar_factor = if self.attrs.ar > 10.33 {
|
let ar_factor = if self.mods.ap() {
|
||||||
|
0.0
|
||||||
|
} else if self.attrs.ar > 10.33 {
|
||||||
0.3 * (self.attrs.ar - 10.33)
|
0.3 * (self.attrs.ar - 10.33)
|
||||||
} else {
|
} else {
|
||||||
0.0
|
0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user