mirror of
https://github.com/ppy/osu.git
synced 2025-03-17 17:17:19 +08:00
quality improvements
This commit is contained in:
parent
6fb3192648
commit
4aaf016ee0
@ -160,10 +160,8 @@ namespace osu.Game.Overlays.Mods
|
||||
protected virtual BeatmapDifficulty GetDifficulty()
|
||||
{
|
||||
BeatmapDifficulty originalDifficulty = new BeatmapDifficulty(BeatmapInfo.Value!.Difficulty);
|
||||
|
||||
foreach (var mod in Mods.Value.OfType<IApplicableToDifficulty>())
|
||||
mod.ApplyToDifficulty(originalDifficulty);
|
||||
|
||||
return originalDifficulty;
|
||||
}
|
||||
private void updateValues() => Scheduler.AddOnce(() =>
|
||||
|
@ -29,8 +29,7 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
BeatmapInfo = { Value = Beatmap?.BeatmapInfo },
|
||||
AccountForMultiplayerMods = true
|
||||
BeatmapInfo = { Value = Beatmap?.BeatmapInfo }
|
||||
};
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -87,15 +86,12 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
double rate = base.GetRate();
|
||||
Ruleset ruleset = GameRuleset.Value.CreateInstance();
|
||||
|
||||
if (AccountForMultiplayerMods && multiplayerRoomItem != null && multiplayerRoomItem.Value != null)
|
||||
if (multiplayerRoomItem != null && multiplayerRoomItem.Value != null)
|
||||
{
|
||||
var multiplayerRoomMods = multiplayerRoomItem.Value.RequiredMods.Select(m => m.ToMod(ruleset));
|
||||
|
||||
foreach (var mod in multiplayerRoomMods.OfType<IApplicableToRate>())
|
||||
rate = mod.ApplyToRate(0, rate);
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
|
||||
@ -103,15 +99,12 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
BeatmapDifficulty originalDifficulty = base.GetDifficulty();
|
||||
Ruleset ruleset = GameRuleset.Value.CreateInstance();
|
||||
|
||||
if (multiplayerRoomItem != null && multiplayerRoomItem.Value != null)
|
||||
{
|
||||
var multiplayerRoomMods = multiplayerRoomItem.Value.RequiredMods.Select(m => m.ToMod(ruleset));
|
||||
|
||||
foreach (var mod in multiplayerRoomMods.OfType<IApplicableToDifficulty>())
|
||||
mod.ApplyToDifficulty(originalDifficulty);
|
||||
}
|
||||
|
||||
return originalDifficulty;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user