mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +08:00
Use order of new combo flags instead of StartTime
This commit is contained in:
parent
78037fa477
commit
10683de578
@ -81,12 +81,13 @@ namespace osu.Game.Rulesets.Catch.Edit
|
||||
double selectionStartTime = SelectedItems.Min(h => h.StartTime);
|
||||
double selectionEndTime = SelectedItems.Max(h => h.GetEndTime());
|
||||
|
||||
var newComboPlaces = hitObjects
|
||||
var newComboOrder = hitObjects
|
||||
.OfType<CatchHitObject>()
|
||||
.Where(h => h.NewCombo)
|
||||
.Select(obj => obj.StartTime)
|
||||
.Select(obj => obj.NewCombo)
|
||||
.ToList();
|
||||
|
||||
newComboOrder.Reverse();
|
||||
|
||||
foreach (var h in hitObjects)
|
||||
{
|
||||
h.StartTime = selectionEndTime - (h.GetEndTime() - selectionStartTime);
|
||||
@ -100,18 +101,11 @@ namespace osu.Game.Rulesets.Catch.Edit
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var h in hitObjects)
|
||||
int i = 0;
|
||||
foreach (bool newCombo in newComboOrder)
|
||||
{
|
||||
if (h is CatchHitObject obj) obj.NewCombo = false;
|
||||
}
|
||||
|
||||
foreach (double place in newComboPlaces)
|
||||
{
|
||||
hitObjects
|
||||
.OfType<CatchHitObject>()
|
||||
.Where(obj => obj.StartTime == place)
|
||||
.ToList()
|
||||
.ForEach(obj => obj.NewCombo = true);
|
||||
hitObjects.OfType<CatchHitObject>().ToList()[i].NewCombo = newCombo;
|
||||
i++;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -85,12 +85,13 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
|
||||
bool moreThanOneObject = hitObjects.Count > 1;
|
||||
|
||||
var newComboPlaces = hitObjects
|
||||
var newComboOrder = hitObjects
|
||||
.OfType<OsuHitObject>()
|
||||
.Where(h => h.NewCombo)
|
||||
.Select(obj => obj.StartTime)
|
||||
.Select(obj => obj.NewCombo)
|
||||
.ToList();
|
||||
|
||||
newComboOrder.Reverse();
|
||||
|
||||
foreach (var h in hitObjects)
|
||||
{
|
||||
if (moreThanOneObject)
|
||||
@ -103,18 +104,11 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var h in hitObjects)
|
||||
int i = 0;
|
||||
foreach (bool newCombo in newComboOrder)
|
||||
{
|
||||
if (h is OsuHitObject obj) obj.NewCombo = false;
|
||||
}
|
||||
|
||||
foreach (double place in newComboPlaces)
|
||||
{
|
||||
hitObjects
|
||||
.OfType<OsuHitObject>()
|
||||
.Where(obj => obj.StartTime == place)
|
||||
.ToList()
|
||||
.ForEach(obj => obj.NewCombo = true);
|
||||
hitObjects.OfType<OsuHitObject>().ToList()[i].NewCombo = newCombo;
|
||||
i++;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user