1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 01:32:55 +08:00

Merge conditionals

This commit is contained in:
Bartłomiej Dach 2025-01-10 14:13:03 +01:00
parent 8f4eafea4e
commit 0d9a3428ae
No known key found for this signature in database
2 changed files with 18 additions and 24 deletions

View File

@ -163,20 +163,17 @@ namespace osu.Game.Rulesets.Catch.Objects
int indexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
int inCurrentCombo = (lastObj?.IndexInCurrentCombo + 1) ?? 0;
// For the purpose of combo colours, spinners never start a new combo even if they are flagged as doing so.
if (this is not BananaShower)
// - For the purpose of combo colours, spinners never start a new combo even if they are flagged as doing so.
// - At decode time, the first hitobject in the beatmap and the first hitobject after a banana shower are both enforced to be a new combo,
// but this isn't directly enforced by the editor so the extra checks against the last hitobject are duplicated here.
if (this is not BananaShower && (NewCombo || lastObj == null || lastObj is BananaShower))
{
// At decode time, the first hitobject in the beatmap and the first hitobject after a banana shower are both enforced to be a new combo,
// but this isn't directly enforced by the editor so the extra checks against the last hitobject are duplicated here.
if (NewCombo || lastObj == null || lastObj is BananaShower)
{
inCurrentCombo = 0;
index++;
indexWithOffsets += ComboOffset + 1;
inCurrentCombo = 0;
index++;
indexWithOffsets += ComboOffset + 1;
if (lastObj != null)
lastObj.LastInCombo = true;
}
if (lastObj != null)
lastObj.LastInCombo = true;
}
ComboIndex = index;

View File

@ -188,20 +188,17 @@ namespace osu.Game.Rulesets.Osu.Objects
int indexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
int inCurrentCombo = (lastObj?.IndexInCurrentCombo + 1) ?? 0;
// For the purpose of combo colours, spinners never start a new combo even if they are flagged as doing so.
if (this is not Spinner)
// - For the purpose of combo colours, spinners never start a new combo even if they are flagged as doing so.
// - At decode time, the first hitobject in the beatmap and the first hitobject after a spinner are both enforced to be a new combo,
// but this isn't directly enforced by the editor so the extra checks against the last hitobject are duplicated here.
if (this is not Spinner && (NewCombo || lastObj == null || lastObj is Spinner))
{
// At decode time, the first hitobject in the beatmap and the first hitobject after a spinner are both enforced to be a new combo,
// but this isn't directly enforced by the editor so the extra checks against the last hitobject are duplicated here.
if (NewCombo || lastObj == null || lastObj is Spinner)
{
inCurrentCombo = 0;
index++;
indexWithOffsets += ComboOffset + 1;
inCurrentCombo = 0;
index++;
indexWithOffsets += ComboOffset + 1;
if (lastObj != null)
lastObj.LastInCombo = true;
}
if (lastObj != null)
lastObj.LastInCombo = true;
}
ComboIndex = index;