From 0132f00073f931d542c00ab7209d4b5246587a50 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 10 Dec 2016 17:26:55 +0100 Subject: [PATCH] get rid of code repetition --- src/itdelatrisu/opsu/GameData.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/itdelatrisu/opsu/GameData.java b/src/itdelatrisu/opsu/GameData.java index d1e7a674..269a8148 100644 --- a/src/itdelatrisu/opsu/GameData.java +++ b/src/itdelatrisu/opsu/GameData.java @@ -898,6 +898,7 @@ public class GameData { // hit animation if (hitResult.result != HIT_MISS && ( + hitResult.hitResultType == null || hitResult.hitResultType == HitObjectType.CIRCLE || hitResult.hitResultType == HitObjectType.SLIDER_FIRST || hitResult.hitResultType == HitObjectType.SLIDER_LAST)) { @@ -931,19 +932,6 @@ public class GameData { } } - if (hitResult.result == HIT_SLIDER_INITIAL && !GameMod.HIDDEN.isActive()) { - float progress = AnimationEquation.OUT_CUBIC.calc( - (float) Utils.clamp(trackPosition - hitResult.time, 0, HITCIRCLE_FADE_TIME) / HITCIRCLE_FADE_TIME); - float scale = (!hitResult.expand) ? 1f : 1f + (HITCIRCLE_ANIM_SCALE - 1f) * progress; - float alpha = 1f - progress; - Image scaledHitCircle = GameImage.HITCIRCLE.getImage().getScaledCopy(scale); - Image scaledHitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(scale); - scaledHitCircle.setAlpha(alpha); - scaledHitCircleOverlay.setAlpha(alpha); - scaledHitCircle.drawCentered(hitResult.x, hitResult.y, hitResult.color); - scaledHitCircleOverlay.drawCentered(hitResult.x, hitResult.y); - } - // hit result if (!hitResult.hideResult && ( hitResult.hitResultType == HitObjectType.CIRCLE ||