Skip to content

Commit

Permalink
Fix breakage from reordering co-reliant variable sets (and guard agai…
Browse files Browse the repository at this point in the history
…nst it)
  • Loading branch information
peppy committed Jan 24, 2025
1 parent a04b03d commit c810e41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions osu.Game/Screens/Play/MasterGameplayClockContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ public MasterGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart

track = beatmap.Track;

StartTime = findEarliestStartTime();
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.
// 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).
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.
// this is commonly used to display an intro before the audio track start.
Expand Down

0 comments on commit c810e41

Please sign in to comment.