1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 14:52:55 +08:00

Fix new-style legacy skins with animated judgements not adding correct transforms

Closes #16173.
This commit is contained in:
Dean Herbert 2022-09-12 18:53:37 +09:00
parent 4b37330316
commit e29f5cb456
2 changed files with 7 additions and 4 deletions

View File

@ -56,7 +56,7 @@ namespace osu.Game.Skinning
if (result != HitResult.Miss) if (result != HitResult.Miss)
{ {
//new judgement shows old as a temporary effect //new judgement shows old as a temporary effect
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f) AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
{ {
Blending = BlendingParameters.Additive, Blending = BlendingParameters.Additive,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,

View File

@ -19,10 +19,13 @@ namespace osu.Game.Skinning
private readonly float finalScale; private readonly float finalScale;
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f) private readonly bool allowTransforms;
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f, bool allowTransforms = false)
{ {
this.result = result; this.result = result;
this.finalScale = finalScale; this.finalScale = finalScale;
this.allowTransforms = allowTransforms;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Origin = Anchor.Centre; Origin = Anchor.Centre;
@ -43,8 +46,8 @@ namespace osu.Game.Skinning
this.FadeInFromZero(fade_in_length); this.FadeInFromZero(fade_in_length);
this.Delay(fade_out_delay).FadeOut(fade_out_length); this.Delay(fade_out_delay).FadeOut(fade_out_length);
// legacy judgements don't play any transforms if they are an animation. // legacy judgements don't play any transforms if they are an animation.... UNLESS they are the temporary displayed judgement from new piece.
if (animation?.FrameCount > 1) if (!allowTransforms && animation?.FrameCount > 1)
return; return;
switch (result) switch (result)