mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 14:32:56 +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)
|
public void PrepareTrackForPreview(bool looping, double offsetFromPreviewPoint = 0)
|
||||||
{
|
{
|
||||||
Track.Looping = looping;
|
Track.Looping = looping;
|
||||||
Track.RestartPoint = Metadata.PreviewTime - offsetFromPreviewPoint;
|
Track.RestartPoint = Metadata.PreviewTime;
|
||||||
|
|
||||||
if (Track.RestartPoint == -1)
|
if (Track.RestartPoint == -1)
|
||||||
{
|
{
|
||||||
@ -125,6 +125,8 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
Track.RestartPoint = 0.4f * Track.Length;
|
Track.RestartPoint = 0.4f * Track.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Track.RestartPoint += offsetFromPreviewPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -278,7 +278,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (!UsingThemedIntro)
|
if (!UsingThemedIntro)
|
||||||
{
|
{
|
||||||
initialBeatmap?.PrepareTrackForPreview(false, 2600);
|
initialBeatmap?.PrepareTrackForPreview(false, -2600);
|
||||||
|
|
||||||
drawableTrack.VolumeTo(0);
|
drawableTrack.VolumeTo(0);
|
||||||
drawableTrack.Restart();
|
drawableTrack.Restart();
|
||||||
|
Loading…
Reference in New Issue
Block a user