1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Remove EarliestDisplayTime's input to CommandStartTime

This commit is contained in:
Dean Herbert 2022-09-06 15:48:54 +09:00
parent abf0242686
commit a5e57b083c

View File

@ -47,30 +47,11 @@ namespace osu.Game.Storyboards
}; };
} }
/// <summary>
/// Returns the earliest visible time. Will be null unless this group's first <see cref="Alpha"/> command has a start value of zero.
/// </summary>
public double? EarliestDisplayedTime
{
get
{
var first = Alpha.Commands.FirstOrDefault();
return first?.StartValue == 0 ? first.StartTime : null;
}
}
[JsonIgnore] [JsonIgnore]
public double CommandsStartTime public double CommandsStartTime
{ {
get get
{ {
// if the first alpha command starts at zero it should be given priority over anything else.
// this is due to it creating a state where the target is not present before that time, causing any other events to not be visible.
double? earliestDisplay = EarliestDisplayedTime;
if (earliestDisplay != null)
return earliestDisplay.Value;
double min = double.MaxValue; double min = double.MaxValue;
for (int i = 0; i < timelines.Length; i++) for (int i = 0; i < timelines.Length; i++)