From 4c9cda7e40730d88613e214eb2583e4e32adbef7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 28 Feb 2021 17:33:08 -0500 Subject: [PATCH] Cleanup --- .../world/blocks/defense/OverdriveProjector.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java index 7ccfa633e7..29e373578f 100644 --- a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java @@ -135,19 +135,14 @@ public class OverdriveProjector extends Block{ Draw.rect(topRegion, x, y); Draw.alpha(1f); Lines.stroke((2f * f + 0.1f) * heat); - //float hype = 1.414f * size * tilesize / 2f; // hypotenuse - float r = Math.max(0f, Mathf.clamp(2f - f * 2f) * size * tilesize / 2f - f - 0.2f); - float w = Mathf.clamp(0.5f - f) * size * tilesize; + + float r = Math.max(0f, Mathf.clamp(2f - f * 2f) * size * tilesize / 2f - f - 0.2f), w = Mathf.clamp(0.5f - f) * size * tilesize; Lines.beginLine(); for(int i = 0; i < 4; i++){ Lines.linePoint(x + Geometry.d4(i).x * r + Geometry.d4(i).y * w, y + Geometry.d4(i).y * r - Geometry.d4(i).x * w); if(f < 0.5f) Lines.linePoint(x + Geometry.d4(i).x * r - Geometry.d4(i).y * w, y + Geometry.d4(i).y * r + Geometry.d4(i).x * w); - - //Lines.lineAngleCenter(x + Geometry.d8edge(i).x * size * tilesize / 2f * (1f - f), y + Geometry.d8edge(i).y * size * tilesize / 2f * (1f - f), 135f + 90f * i, hype * (0.5f - Math.abs(f - 0.5f)) * 2f); - //if(f < 0.5f) Lines.lineAngleCenter(x + Geometry.d4(i).x * size * tilesize / 2f - Geometry.d4(i).x * f, y + Geometry.d4(i).y * size * tilesize / 2f - Geometry.d4(i).y * f, 90f + 90f * i, (0.5f - f) * 2f * size * tilesize); } Lines.endLine(true); - //Lines.square(x, y, Math.min(1f + (1f - f) * size * tilesize / 2f, size * tilesize/2f)); Draw.reset(); }