fix: clamp map attributes

This commit is contained in:
MaxOhn
2024-11-13 00:26:27 +01:00
parent d6d191622f
commit 11095ad6b4
+3 -2
View File
@@ -105,8 +105,9 @@ impl BeatmapAttributesBuilder {
pub fn map(self, map: &Beatmap) -> Self { pub fn map(self, map: &Beatmap) -> Self {
Self { Self {
mode: map.mode, mode: map.mode,
ar: ModsDependentKind::Default(ModsDependent::new(map.ar)), // Clamping necessary to match lazer on maps like /b/4243836.
od: ModsDependentKind::Default(ModsDependent::new(map.od)), ar: ModsDependentKind::Default(ModsDependent::new(map.ar.clamp(0.0, 10.0))),
od: ModsDependentKind::Default(ModsDependent::new(map.od.clamp(0.0, 10.0))),
cs: ModsDependentKind::Default(ModsDependent::new(map.cs)), cs: ModsDependentKind::Default(ModsDependent::new(map.cs)),
hp: ModsDependentKind::Default(ModsDependent::new(map.hp)), hp: ModsDependentKind::Default(ModsDependent::new(map.hp)),
is_convert: map.is_convert, is_convert: map.is_convert,