Split conditional for readability

This commit is contained in:
Bartłomiej Dach 2020-08-22 17:34:08 +02:00
parent bcf3cd5657
commit 7e2bef3b9f
1 changed files with 4 additions and 1 deletions

View File

@ -118,7 +118,10 @@ protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(I
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(