From 69a26900fea78cf0b7516956b9519ddfaf09bc1a Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 5 Jul 2022 20:15:34 -0400 Subject: [PATCH] Don't draw shape parts at 0 rad/stroke --- core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 4557 -> 4573 bytes .../src/mindustry/entities/part/HaloPart.java | 10 +++++++--- .../mindustry/entities/part/ShapePart.java | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index af31c433fe..a0ef0e366e 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -572,3 +572,4 @@ 63112=scathe|block-scathe-ui 63111=scathe-missile|unit-scathe-missile-ui 63110=ravage|block-ravage-ui +63109=underflow-duct|block-underflow-duct-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 2b63928fff844e2a816722233c2c903fec8765aa..eeb8d385bd6f43e4bdfdeef4a30de19ba6365d79 100644 GIT binary patch delta 31 ncmX@Bd{>!?;rm9WGkpAfrFki-MQJ(t<+>@Q$t8==@-YJdzYq(^ delta 16 Ycmcbsd{&u>;oC;0Gklxx@%?8406Xvp761SM diff --git a/core/src/mindustry/entities/part/HaloPart.java b/core/src/mindustry/entities/part/HaloPart.java index cd0029ba27..0f5f4cafd0 100644 --- a/core/src/mindustry/entities/part/HaloPart.java +++ b/core/src/mindustry/entities/part/HaloPart.java @@ -66,10 +66,14 @@ public class HaloPart extends DrawPart{ float pointRot = rot + shapeMoveRot * prog * sign + shapeRotation * sign + baseRot * sign; if(tri){ - Drawf.tri(shapeX, shapeY, rad, triLen, pointRot); + if(rad > 0.001 && triLen > 0.001){ + Drawf.tri(shapeX, shapeY, rad, triLen, pointRot); + } }else if(!hollow){ - Fill.poly(shapeX, shapeY, sides, rad, pointRot); - }else{ + if(rad > 0.001){ + Fill.poly(shapeX, shapeY, sides, rad, pointRot); + } + }else if(str > 0.001){ Lines.stroke(str); Lines.poly(shapeX, shapeY, sides, rad, pointRot); Lines.stroke(1f); diff --git a/core/src/mindustry/entities/part/ShapePart.java b/core/src/mindustry/entities/part/ShapePart.java index 616ee83d88..7093c46b6b 100644 --- a/core/src/mindustry/entities/part/ShapePart.java +++ b/core/src/mindustry/entities/part/ShapePart.java @@ -56,7 +56,7 @@ public class ShapePart extends DrawPart{ }else{ Fill.circle(rx, ry, rad); } - }else{ + }else if(str > 0.0001f){ Lines.stroke(str); if(!circle){ Lines.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign + baseRot * sign);