1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 06:20:02 +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
Unverified
3 changed files with 6 additions and 4 deletions
+1 -1
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);
}
}
+3 -1
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>
+2 -2
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
{