From 4c4476ae95c94e5d21d9dc3fe0e6f69a4f73e4f7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 21 Apr 2024 10:05:05 -0400 Subject: [PATCH] Fixed #9763 --- core/src/mindustry/graphics/OverlayRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/graphics/OverlayRenderer.java b/core/src/mindustry/graphics/OverlayRenderer.java index 844a087c8e..b9dc661054 100644 --- a/core/src/mindustry/graphics/OverlayRenderer.java +++ b/core/src/mindustry/graphics/OverlayRenderer.java @@ -258,8 +258,9 @@ public class OverlayRenderer{ } public void checkApplySelection(Unit u){ - if(unitFade > 0 && lastSelect == u){ - Draw.mixcol(Pal.accent, unitFade); + if(unitFade > 0.001f && lastSelect == u){ + Color prev = Draw.getMixColor(); + Draw.mixcol(prev.a > 0.001f ? prev.lerp(Pal.accent, unitFade) : Pal.accent, Math.max(unitFade, prev.a)); } }