fixed object count for mania converts
This commit is contained in:
@@ -143,7 +143,7 @@ impl Beatmap {
|
|||||||
|
|
||||||
for new_pattern in gen.generate() {
|
for new_pattern in gen.generate() {
|
||||||
let new_objects = new_pattern.hit_objects.iter().map(|h| {
|
let new_objects = new_pattern.hit_objects.iter().map(|h| {
|
||||||
if obj.is_circle() {
|
if h.is_circle() {
|
||||||
n_circles += 1;
|
n_circles += 1;
|
||||||
} else {
|
} else {
|
||||||
n_sliders += 1;
|
n_sliders += 1;
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ impl Beatmap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Convert a [`Beatmap`] of some mode into a different mode.
|
/// 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]
|
#[inline]
|
||||||
pub fn convert_mode(&self, mode: GameMode) -> Cow<'_, Self> {
|
pub fn convert_mode(&self, mode: GameMode) -> Cow<'_, Self> {
|
||||||
if mode == self.mode {
|
if mode == self.mode {
|
||||||
|
|||||||
Reference in New Issue
Block a user