feat: add mods to speed skill

This commit is contained in:
tsunyoku
2022-11-12 13:53:18 +00:00
parent e3e583ce40
commit 1a350a6cee
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ impl Skills {
Self {
aim: Aim::new(true),
aim_no_sliders: Aim::new(false),
speed: Speed::new(hit_window),
speed: Speed::new(hit_window, mods),
flashlight: Flashlight::new(mods, radius, time_preempt, time_fade_in),
}
}
+3 -1
View File
@@ -13,13 +13,14 @@ pub(crate) struct Speed {
pub(crate) strain_peaks: Vec<f64>,
object_strains: Vec<f64>,
hit_window: f64,
mods: u32,
}
impl Speed {
const SKILL_MULTIPLIER: f64 = 1375.0;
const STRAIN_DECAY_BASE: f64 = 0.3;
pub(crate) fn new(hit_window: f64) -> Self {
pub(crate) fn new(hit_window: f64, mods: u32) -> Self {
Self {
curr_strain: 0.0,
curr_section_peak: 0.0,
@@ -28,6 +29,7 @@ impl Speed {
strain_peaks: Vec::new(),
object_strains: Vec::new(),
hit_window,
mods,
}
}