fixed object count for mania converts

This commit is contained in:
MaxOhn
2022-07-06 14:28:18 +02:00
parent 29710b3290
commit c59d9d055d
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ impl Beatmap {
for new_pattern in gen.generate() {
let new_objects = new_pattern.hit_objects.iter().map(|h| {
if obj.is_circle() {
if h.is_circle() {
n_circles += 1;
} else {
n_sliders += 1;
+6
View File
@@ -119,6 +119,12 @@ impl Beatmap {
}
/// Convert a [`Beatmap`] of some mode into a different mode.
///
/// # Note
/// - Since hitsounds are irrelevant for difficulty and performance calculations
/// in osu!mania, the resulting map of a conversion to mania will not contain hitsounds.
/// - To avoid having to clone the map for osu!catch conversions, the field `Beatmap::mode`
/// will not be adjusted in a ctb-converted map.
#[inline]
pub fn convert_mode(&self, mode: GameMode) -> Cow<'_, Self> {
if mode == self.mode {