Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jan 25, 2024
1 parent dda96d7 commit 6070eac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion osu.Game/Skinning/LegacyJudgementPieceNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public LegacyJudgementPieceNew(HitResult result, Func<Drawable> createMainDrawab
if (!result.IsMiss())
{
//new judgement shows old as a temporary effect
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f)
{
Blending = BlendingParameters.Additive,
Anchor = Anchor.Centre,
Expand Down
12 changes: 1 addition & 11 deletions osu.Game/Skinning/LegacyJudgementPieceOld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ public partial class LegacyJudgementPieceOld : CompositeDrawable, IAnimatableJud
private readonly HitResult result;

private readonly float finalScale;
private readonly bool forceTransforms;

[Resolved]
private ISkinSource skin { get; set; } = null!;

public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f)
{
this.result = result;
this.finalScale = finalScale;
this.forceTransforms = forceTransforms;

AutoSizeAxes = Axes.Both;
Origin = Anchor.Centre;
Expand All @@ -48,14 +46,6 @@ public virtual void PlayAnimation()
this.FadeInFromZero(fade_in_length);
this.Delay(fade_out_delay).FadeOut(fade_out_length);

// 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 && !forceTransforms)
{
if (isMissedTick())
applyMissedTickScaling();
return;
}

if (result.IsMiss())
{
decimal? legacyVersion = skin.GetConfig<SkinConfiguration.LegacySetting, decimal>(SkinConfiguration.LegacySetting.Version)?.Value;
Expand Down

0 comments on commit 6070eac

Please sign in to comment.