Split conditional for readability

This commit is contained in:
Bartłomiej Dach 2020-08-22 17:34:08 +02:00
parent bcf3cd5657
commit 7e2bef3b9f

View File

@ -118,7 +118,10 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
for (int i = 2; i < beatmap.HitObjects.Count; i++)
{
// Check for negative durations
if (beatmap.HitObjects[i].StartTime > beatmap.HitObjects[i - 1].StartTime && beatmap.HitObjects[i - 1].StartTime > beatmap.HitObjects[i - 2].StartTime)
var currentAfterLast = beatmap.HitObjects[i].StartTime > beatmap.HitObjects[i - 1].StartTime;
var lastAfterSecondLast = beatmap.HitObjects[i - 1].StartTime > beatmap.HitObjects[i - 2].StartTime;
if (currentAfterLast && lastAfterSecondLast)
{
taikoDifficultyHitObjects.Add(
new TaikoDifficultyHitObject(