mirror of
https://github.com/ppy/osu.git
synced 2025-02-06 21:43:21 +08:00
Merge conditionals
This commit is contained in:
parent
8f4eafea4e
commit
0d9a3428ae
@ -163,20 +163,17 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
int indexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
|
int indexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
|
||||||
int inCurrentCombo = (lastObj?.IndexInCurrentCombo + 1) ?? 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.
|
// - 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)
|
// - 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,
|
inCurrentCombo = 0;
|
||||||
// but this isn't directly enforced by the editor so the extra checks against the last hitobject are duplicated here.
|
index++;
|
||||||
if (NewCombo || lastObj == null || lastObj is BananaShower)
|
indexWithOffsets += ComboOffset + 1;
|
||||||
{
|
|
||||||
inCurrentCombo = 0;
|
|
||||||
index++;
|
|
||||||
indexWithOffsets += ComboOffset + 1;
|
|
||||||
|
|
||||||
if (lastObj != null)
|
if (lastObj != null)
|
||||||
lastObj.LastInCombo = true;
|
lastObj.LastInCombo = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboIndex = index;
|
ComboIndex = index;
|
||||||
|
@ -188,20 +188,17 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
int indexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
|
int indexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
|
||||||
int inCurrentCombo = (lastObj?.IndexInCurrentCombo + 1) ?? 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.
|
// - 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)
|
// - 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,
|
inCurrentCombo = 0;
|
||||||
// but this isn't directly enforced by the editor so the extra checks against the last hitobject are duplicated here.
|
index++;
|
||||||
if (NewCombo || lastObj == null || lastObj is Spinner)
|
indexWithOffsets += ComboOffset + 1;
|
||||||
{
|
|
||||||
inCurrentCombo = 0;
|
|
||||||
index++;
|
|
||||||
indexWithOffsets += ComboOffset + 1;
|
|
||||||
|
|
||||||
if (lastObj != null)
|
if (lastObj != null)
|
||||||
lastObj.LastInCombo = true;
|
lastObj.LastInCombo = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboIndex = index;
|
ComboIndex = index;
|
||||||
|
Loading…
Reference in New Issue
Block a user