mirror of
https://github.com/ppy/osu.git
synced 2026-05-17 07:22:38 +08:00
6afdf99df8
The quirks in question being that lazer's hit windows in mania preceding this change are used in stable *if and only if* Score V2 is active. If Score V2 is *not* active, stable has two disparate other sets of hit window ranges, dependent on whether the beatmap is a convert or not. With this commit, those hit windows are used in lazer when the Classic mod is active. Open points for discussion would be: - What does this mean for plays already set on lazer using the Classic mod? Are there even enough of them to care about? Also, on `master` the Classic mod does precisely nothing, so maybe such scores should just have Classic mod stripped from them? - What does this mean for the mod multiplier of Classic in mania? (I don't expect an answer to this one.)
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Game.Beatmaps;
|
|
using osu.Game.Rulesets.Mania.Objects;
|
|
using osu.Game.Rulesets.Mania.Scoring;
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
namespace osu.Game.Rulesets.Mania.Mods
|
|
{
|
|
public class ManiaModClassic : ModClassic, IApplicableToBeatmap
|
|
{
|
|
public void ApplyToBeatmap(IBeatmap beatmap)
|
|
{
|
|
bool isConvert = !beatmap.BeatmapInfo.Ruleset.Equals(new ManiaRuleset().RulesetInfo);
|
|
|
|
foreach (var ho in beatmap.HitObjects)
|
|
{
|
|
switch (ho)
|
|
{
|
|
case Note note:
|
|
{
|
|
var hitWindows = (ManiaHitWindows)note.HitWindows;
|
|
hitWindows.IsConvert = isConvert;
|
|
hitWindows.ClassicModActive = true;
|
|
break;
|
|
}
|
|
|
|
case HoldNote hold:
|
|
{
|
|
var headWindows = (ManiaHitWindows)hold.Head.HitWindows;
|
|
var tailWindows = (ManiaHitWindows)hold.Tail.HitWindows;
|
|
headWindows.IsConvert = tailWindows.IsConvert = isConvert;
|
|
headWindows.ClassicModActive = tailWindows.ClassicModActive = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|