mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Fix breakage from reordering co-reliant variable sets (and guard against it)
This commit is contained in:
parent
a04b03d29c
commit
c810e41ac3
@ -72,17 +72,17 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
track = beatmap.Track;
|
track = beatmap.Track;
|
||||||
|
|
||||||
StartTime = findEarliestStartTime();
|
|
||||||
GameplayStartTime = gameplayStartTime;
|
GameplayStartTime = gameplayStartTime;
|
||||||
|
StartTime = findEarliestStartTime(gameplayStartTime, beatmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
private double findEarliestStartTime()
|
private static double findEarliestStartTime(double gameplayStartTime, WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
// here we are trying to find the time to start playback from the "zero" point.
|
// here we are trying to find the time to start playback from the "zero" point.
|
||||||
// generally this is either zero, or some point earlier than zero in the case of storyboards, lead-ins etc.
|
// generally this is either zero, or some point earlier than zero in the case of storyboards, lead-ins etc.
|
||||||
|
|
||||||
// start with the originally provided latest time (if before zero).
|
// start with the originally provided latest time (if before zero).
|
||||||
double time = Math.Min(0, GameplayStartTime);
|
double time = Math.Min(0, gameplayStartTime);
|
||||||
|
|
||||||
// if a storyboard is present, it may dictate the appropriate start time by having events in negative time space.
|
// if a storyboard is present, it may dictate the appropriate start time by having events in negative time space.
|
||||||
// this is commonly used to display an intro before the audio track start.
|
// this is commonly used to display an intro before the audio track start.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user