mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 12:25:04 +08:00
Fix incorrect offset logic for beatmaps without a preview point specified
This commit is contained in:
parent
721bfb5369
commit
db148d145b
@ -113,7 +113,7 @@ namespace osu.Game.Beatmaps
|
||||
public void PrepareTrackForPreview(bool looping, double offsetFromPreviewPoint = 0)
|
||||
{
|
||||
Track.Looping = looping;
|
||||
Track.RestartPoint = Metadata.PreviewTime - offsetFromPreviewPoint;
|
||||
Track.RestartPoint = Metadata.PreviewTime;
|
||||
|
||||
if (Track.RestartPoint == -1)
|
||||
{
|
||||
@ -125,6 +125,8 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
Track.RestartPoint = 0.4f * Track.Length;
|
||||
}
|
||||
|
||||
Track.RestartPoint += offsetFromPreviewPoint;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -278,7 +278,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
if (!UsingThemedIntro)
|
||||
{
|
||||
initialBeatmap?.PrepareTrackForPreview(false, 2600);
|
||||
initialBeatmap?.PrepareTrackForPreview(false, -2600);
|
||||
|
||||
drawableTrack.VolumeTo(0);
|
||||
drawableTrack.Restart();
|
||||
|
Loading…
Reference in New Issue
Block a user