convert map internally for tko & mna

This commit is contained in:
MaxOhn
2022-10-26 22:02:17 +02:00
parent de400b29cf
commit b6ec17fd12
8 changed files with 17 additions and 9 deletions
+5 -2
View File
@@ -53,12 +53,15 @@ impl<'map> ManiaStars<'map> {
/// Create a new difficulty calculator for osu!mania maps.
#[inline]
pub fn new(map: &'map Beatmap) -> Self {
let map = map.convert_mode(GameMode::Mania);
let is_convert = matches!(map, Cow::Owned(_));
Self {
map: Cow::Borrowed(map),
map,
mods: 0,
passed_objects: None,
clock_rate: None,
is_convert: false,
is_convert,
}
}
+1 -1
View File
@@ -63,7 +63,7 @@ impl<'map> ManiaPP<'map> {
#[inline]
pub fn new(map: &'map Beatmap) -> Self {
Self {
map: Cow::Borrowed(map),
map: map.convert_mode(GameMode::Mania),
attributes: None,
mods: 0,
passed_objects: None,