1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00

Fix osu! logo triangles going super fast when the track is paused

This commit is contained in:
Shane Woolcock 2017-09-11 19:01:36 +09:30
parent 3f9b682759
commit 262aea8b6b

View File

@ -272,8 +272,11 @@ namespace osu.Game.Screens.Menu
const float scale_adjust_cutoff = 0.4f;
const float velocity_adjust_cutoff = 0.98f;
const float paused_velocity = 0.5f;
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track?.CurrentAmplitudes.Maximum ?? 0 : 0;
if (Beatmap.Value.Track.IsRunning)
{
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track.CurrentAmplitudes.Maximum : 0;
logoAmplitudeContainer.ScaleTo(1 - Math.Max(0, maxAmplitude - scale_adjust_cutoff) * 0.04f, 75, Easing.OutQuint);
if (maxAmplitude > velocity_adjust_cutoff)
@ -281,6 +284,11 @@ namespace osu.Game.Screens.Menu
else
triangles.Velocity = (float)Interpolation.Damp(triangles.Velocity, 1, 0.995f, Time.Elapsed);
}
else
{
triangles.Velocity = paused_velocity;
}
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{