1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 14:07:25 +08:00

Merge pull request #20687 from NotGumballer91/master

Improve Intro timing with non-osu! theme
This commit is contained in:
Dean Herbert 2022-10-12 15:32:03 +09:00 committed by GitHub
commit 3ba8ffb8de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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>

View File

@ -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
{