From 35923329a1324e7b8ecf23e8c06c63a26edb4f72 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Thu, 18 Aug 2022 20:07:13 -0700 Subject: [PATCH] ParticleEffect line cap option (#7392) --- core/src/mindustry/entities/effect/ParticleEffect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/effect/ParticleEffect.java b/core/src/mindustry/entities/effect/ParticleEffect.java index 39213eef35..0913cecb62 100644 --- a/core/src/mindustry/entities/effect/ParticleEffect.java +++ b/core/src/mindustry/entities/effect/ParticleEffect.java @@ -44,6 +44,7 @@ public class ParticleEffect extends Effect{ //line only public boolean line; public float strokeFrom = 2f, strokeTo = 0f, lenFrom = 4f, lenTo = 2f; + public boolean cap = true; private @Nullable TextureRegion tex; @@ -77,7 +78,7 @@ public class ParticleEffect extends Effect{ rv.trns(realRotation + rand.range(cone), !randLength ? l : rand.random(l)); float x = rv.x, y = rv.y; - Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len); + Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len, cap); Drawf.light(ox + x, oy + y, len * lightScl, lightColor, lightOpacity * Draw.getColor().a); } }else{