mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Merge pull request #20687 from NotGumballer91/master
Improve Intro timing with non-osu! theme
This commit is contained in:
commit
3ba8ffb8de
@ -134,6 +134,6 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// Reads the correct track restart point from beatmap metadata and sets looping to enabled.
|
||||
/// </summary>
|
||||
void PrepareTrackForPreview(bool looping);
|
||||
void PrepareTrackForPreview(bool looping, double offsetFromPreviewPoint = 0);
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public Track LoadTrack() => track = GetBeatmapTrack() ?? GetVirtualTrack(1000);
|
||||
|
||||
public void PrepareTrackForPreview(bool looping)
|
||||
public void PrepareTrackForPreview(bool looping, double offsetFromPreviewPoint = 0)
|
||||
{
|
||||
Track.Looping = looping;
|
||||
Track.RestartPoint = Metadata.PreviewTime;
|
||||
@ -125,6 +125,8 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
Track.RestartPoint = 0.4f * Track.Length;
|
||||
}
|
||||
|
||||
Track.RestartPoint += offsetFromPreviewPoint;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -278,11 +278,11 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
if (!UsingThemedIntro)
|
||||
{
|
||||
initialBeatmap?.PrepareTrackForPreview(false);
|
||||
initialBeatmap?.PrepareTrackForPreview(false, -2600);
|
||||
|
||||
drawableTrack.VolumeTo(0);
|
||||
drawableTrack.Restart();
|
||||
drawableTrack.VolumeTo(1, 2200, Easing.InCubic);
|
||||
drawableTrack.VolumeTo(1, 2600, Easing.InCubic);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user