mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Legacy multiplier only needs to be applied to SliderMultiplier.
This commit is contained in:
@ -9,9 +9,8 @@ using osu.Game.Modes.Taiko.Objects;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps.Legacy;
|
|
||||||
using osu.Game.Beatmaps.Timing;
|
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using osu.Game.IO.Serialization;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Beatmaps
|
namespace osu.Game.Modes.Taiko.Beatmaps
|
||||||
{
|
{
|
||||||
@ -41,9 +40,12 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
|
|
||||||
public Beatmap<TaikoHitObject> Convert(Beatmap original)
|
public Beatmap<TaikoHitObject> Convert(Beatmap original)
|
||||||
{
|
{
|
||||||
|
BeatmapInfo info = original.BeatmapInfo.DeepClone<BeatmapInfo>();
|
||||||
|
info.Difficulty.SliderMultiplier *= legacy_velocity_multiplier;
|
||||||
|
|
||||||
return new Beatmap<TaikoHitObject>(original)
|
return new Beatmap<TaikoHitObject>(original)
|
||||||
{
|
{
|
||||||
TimingInfo = original is LegacyBeatmap ? new LegacyTimingInfo(original.TimingInfo) : original.TimingInfo,
|
BeatmapInfo = info,
|
||||||
HitObjects = original.HitObjects.SelectMany(h => convertHitObject(h, original)).ToList()
|
HitObjects = original.HitObjects.SelectMany(h => convertHitObject(h, original)).ToList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -75,7 +77,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
double distance = distanceData.Distance * repeats * legacy_velocity_multiplier;
|
double distance = distanceData.Distance * repeats * legacy_velocity_multiplier;
|
||||||
|
|
||||||
// The velocity of the taiko hit object - calculated as the velocity of a drum roll
|
// The velocity of the taiko hit object - calculated as the velocity of a drum roll
|
||||||
double taikoVelocity = taiko_base_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier / speedAdjustedBeatLength * legacy_velocity_multiplier;
|
double taikoVelocity = taiko_base_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier * legacy_velocity_multiplier / speedAdjustedBeatLength;
|
||||||
// The duration of the taiko hit object
|
// The duration of the taiko hit object
|
||||||
double taikoDuration = distance / taikoVelocity;
|
double taikoDuration = distance / taikoVelocity;
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
speedAdjustedBeatLength /= speedAdjustment;
|
speedAdjustedBeatLength /= speedAdjustment;
|
||||||
|
|
||||||
// The velocity of the osu! hit object - calculated as the velocity of a slider
|
// The velocity of the osu! hit object - calculated as the velocity of a slider
|
||||||
double osuVelocity = osu_base_scoring_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier / speedAdjustedBeatLength * legacy_velocity_multiplier;
|
double osuVelocity = osu_base_scoring_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier * legacy_velocity_multiplier / speedAdjustedBeatLength;
|
||||||
// The duration of the osu! hit object
|
// The duration of the osu! hit object
|
||||||
double osuDuration = distance / osuVelocity;
|
double osuDuration = distance / osuVelocity;
|
||||||
|
|
||||||
@ -155,21 +157,5 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LegacyTimingInfo : TimingInfo
|
|
||||||
{
|
|
||||||
public LegacyTimingInfo(TimingInfo original)
|
|
||||||
{
|
|
||||||
if (original is LegacyTimingInfo)
|
|
||||||
ControlPoints.AddRange(original.ControlPoints);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ControlPoints.AddRange(original.ControlPoints.Select(c => c.Clone()));
|
|
||||||
|
|
||||||
foreach (var c in ControlPoints)
|
|
||||||
c.SpeedMultiplier *= legacy_velocity_multiplier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user