Fix TaikoBeatmapConverter attempting to convert taiko-specific drum rolls to hits. Fixes #1149

This commit is contained in:
smoogipooo 2017-08-21 12:04:58 +09:00
parent aa5afc30ef
commit 0970439e34
1 changed files with 5 additions and 1 deletions

View File

@ -39,10 +39,14 @@ internal class TaikoBeatmapConverter : BeatmapConverter<TaikoHitObject>
/// </summary>
private const float taiko_base_distance = 100;
private bool isForCurrentRuleset;
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(HitObject) };
protected override Beatmap<TaikoHitObject> ConvertBeatmap(Beatmap original, bool isForCurrentRuleset)
{
this.isForCurrentRuleset = isForCurrentRuleset;
// Rewrite the beatmap info to add the slider velocity multiplier
BeatmapInfo info = original.BeatmapInfo.DeepClone();
info.Difficulty.SliderMultiplier *= legacy_velocity_multiplier;
@ -104,7 +108,7 @@ protected override IEnumerable<TaikoHitObject> ConvertHitObject(HitObject obj, B
// If the drum roll is to be split into hit circles, assume the ticks are 1/8 spaced within the duration of one beat
double tickSpacing = Math.Min(speedAdjustedBeatLength / beatmap.BeatmapInfo.Difficulty.SliderTickRate, taikoDuration / repeats);
if (tickSpacing > 0 && osuDuration < 2 * speedAdjustedBeatLength)
if (!isForCurrentRuleset && tickSpacing > 0 && osuDuration < 2 * speedAdjustedBeatLength)
{
List<SampleInfoList> allSamples = curveData != null ? curveData.RepeatSamples : new List<SampleInfoList>(new[] { samples });