fruits: fixed passed_objects in star calculation

This commit is contained in:
MaxOhn
2021-02-01 16:44:35 +01:00
parent 33b09c7f4c
commit 829682e9ee
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
# Upcoming
- mania: Fixed pp calculation on HR
- osu: Fixed panic on unwraping unavailable hit results
- fruits: Fixed passed objects in star calculation
- mania: Fixed pp calculation on HR
- osu: Fixed panic on unwraping unavailable hit results
+2 -2
View File
@@ -48,7 +48,6 @@ pub fn stars(map: &Beatmap, mods: impl Mods, passed_objects: Option<usize>) -> S
let mut hit_objects = map
.hit_objects
.iter()
.take(take)
.scan((None, 0.0), |(last_pos, last_time), h| match &h.kind {
HitObjectKind::Circle => {
let mut h = CatchObject::new((h.pos, h.start_time));
@@ -171,7 +170,8 @@ pub fn stars(map: &Beatmap, mods: impl Mods, passed_objects: Option<usize>) -> S
HitObjectKind::Spinner { .. } | HitObjectKind::Hold { .. } => Some(None),
})
.filter_map(identity)
.flatten();
.flatten()
.take(take);
// Hyper dash business
let half_catcher_width = calculate_catch_width(attributes.cs) / 2.0 / ALLOWED_CATCH_RANGE;