mirror of
https://github.com/ppy/osu
synced 2024-12-16 20:05:41 +00:00
Merge pull request #19007 from goodtrailer/fix-rewind-spinner-accent
Fix default spinner's accent on rewind in user replays
This commit is contained in:
commit
2eba38ca88
@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
complete.BindValueChanged(complete => updateComplete(complete.NewValue, 200));
|
complete.BindValueChanged(complete => updateDiscColour(complete.NewValue, 200));
|
||||||
drawableSpinner.ApplyCustomUpdateState += updateStateTransforms;
|
drawableSpinner.ApplyCustomUpdateState += updateStateTransforms;
|
||||||
|
|
||||||
updateStateTransforms(drawableSpinner, drawableSpinner.State.Value);
|
updateStateTransforms(drawableSpinner, drawableSpinner.State.Value);
|
||||||
@ -137,6 +137,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
this.ScaleTo(initial_scale);
|
this.ScaleTo(initial_scale);
|
||||||
this.RotateTo(0);
|
this.RotateTo(0);
|
||||||
|
|
||||||
|
updateDiscColour(false);
|
||||||
|
|
||||||
using (BeginDelayedSequence(spinner.TimePreempt / 2))
|
using (BeginDelayedSequence(spinner.TimePreempt / 2))
|
||||||
{
|
{
|
||||||
// constant ambient rotation to give the spinner "spinning" character.
|
// constant ambient rotation to give the spinner "spinning" character.
|
||||||
@ -177,12 +179,14 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// transforms we have from completing the spinner will be rolled back, so reapply immediately.
|
if (drawableSpinner.Result?.TimeCompleted is double completionTime)
|
||||||
using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt))
|
{
|
||||||
updateComplete(state == ArmedState.Hit, 0);
|
using (BeginAbsoluteSequence(completionTime))
|
||||||
|
updateDiscColour(true, 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateComplete(bool complete, double duration)
|
private void updateDiscColour(bool complete, double duration = 0)
|
||||||
{
|
{
|
||||||
var colour = complete ? completeColour : normalColour;
|
var colour = complete ? completeColour : normalColour;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user