Pass original hitobject HitWindows during conversion

This commit is contained in:
smoogipoo 2018-05-11 15:30:50 +09:00
parent 8216bc311a
commit faa82f17cc
3 changed files with 15 additions and 5 deletions

View File

@ -59,7 +59,6 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
protected override Beatmap<ManiaHitObject> ConvertBeatmap(IBeatmap original)
{
BeatmapDifficulty difficulty = original.BeatmapInfo.BaseDifficulty;
int seed = (int)Math.Round(difficulty.DrainRate + difficulty.CircleSize) * 20 + (int)(difficulty.OverallDifficulty * 41.2) + (int)Math.Round(difficulty.ApproachRate);
@ -85,7 +84,10 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
yield break;
foreach (ManiaHitObject obj in objects)
{
obj.HitWindows = original.HitWindows;
yield return obj;
}
}
private readonly List<double> prevNoteTimes = new List<double>(max_notes_for_density);

View File

@ -40,7 +40,8 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
RepeatSamples = curveData.RepeatSamples,
RepeatCount = curveData.RepeatCount,
Position = positionData?.Position ?? Vector2.Zero,
NewCombo = comboData?.NewCombo ?? false
NewCombo = comboData?.NewCombo ?? false,
HitWindows = original.HitWindows
};
}
else if (endTimeData != null)
@ -50,8 +51,8 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
StartTime = original.StartTime,
Samples = original.Samples,
EndTime = endTimeData.EndTime,
Position = positionData?.Position ?? OsuPlayfield.BASE_SIZE / 2,
HitWindows = original.HitWindows
};
}
else
@ -61,7 +62,8 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
StartTime = original.StartTime,
Samples = original.Samples,
Position = positionData?.Position ?? Vector2.Zero,
NewCombo = comboData?.NewCombo ?? false
NewCombo = comboData?.NewCombo ?? false,
HitWindows = original.HitWindows
};
}
}

View File

@ -132,7 +132,8 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
{
StartTime = j,
Samples = currentSamples,
IsStrong = strong
IsStrong = strong,
HitWindows = obj.HitWindows
};
}
else
@ -142,6 +143,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
StartTime = j,
Samples = currentSamples,
IsStrong = strong,
HitWindows = obj.HitWindows
};
}
@ -157,6 +159,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
IsStrong = strong,
Duration = taikoDuration,
TickRate = beatmap.BeatmapInfo.BaseDifficulty.SliderTickRate == 3 ? 3 : 4,
HitWindows = obj.HitWindows
};
}
}
@ -171,6 +174,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
IsStrong = strong,
Duration = endTimeData.Duration,
RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier),
HitWindows = obj.HitWindows
};
}
else
@ -184,6 +188,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
StartTime = obj.StartTime,
Samples = obj.Samples,
IsStrong = strong,
HitWindows = obj.HitWindows
};
}
else
@ -193,6 +198,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
StartTime = obj.StartTime,
Samples = obj.Samples,
IsStrong = strong,
HitWindows = obj.HitWindows
};
}
}