reworked attribute calculation (#15)
This commit is contained in:
@@ -66,8 +66,8 @@ pub struct CatchGradualDifficultyAttributes<'map> {
|
||||
|
||||
impl<'map> CatchGradualDifficultyAttributes<'map> {
|
||||
/// Create a new difficulty attributes iterator for osu!catch maps.
|
||||
pub fn new(map: &'map Beatmap, mods: impl Mods) -> Self {
|
||||
let map_attributes = map.attributes().mods(mods);
|
||||
pub fn new(map: &'map Beatmap, mods: u32) -> Self {
|
||||
let map_attributes = map.attributes().mods(mods).build();
|
||||
|
||||
let attributes = CatchDifficultyAttributes {
|
||||
ar: map_attributes.ar,
|
||||
|
||||
+2
-2
@@ -147,8 +147,8 @@ fn calculate_movement(params: CatchStars<'_>) -> (Movement, CatchDifficultyAttri
|
||||
} = params;
|
||||
|
||||
let take = passed_objects.unwrap_or(usize::MAX);
|
||||
let map_attributes = map.attributes().mods(mods);
|
||||
let clock_rate = clock_rate.unwrap_or(map_attributes.clock_rate);
|
||||
let clock_rate = clock_rate.unwrap_or_else(|| mods.clock_rate());
|
||||
let map_attributes = map.attributes().mods(mods).clock_rate(clock_rate).build();
|
||||
|
||||
let attributes = CatchDifficultyAttributes {
|
||||
ar: map_attributes.ar,
|
||||
|
||||
Reference in New Issue
Block a user