From 17913f8949e973717a585dcd8e082f7addf88a12 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Tue, 9 Apr 2024 07:52:41 -0700 Subject: [PATCH] Run applyColor before drawing unit parts (#9547) * Run applyColor before drawing unit parts * Run applyColor before drawing weapon parts --- core/src/mindustry/type/UnitType.java | 1 + core/src/mindustry/type/Weapon.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index d7dfcf16fe..b9f7ecd089 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -1270,6 +1270,7 @@ public class UnitType extends UnlockableContent implements Senseable{ DrawPart.params.life = s.fin(); } + applyColor(unit); part.draw(DrawPart.params); } } diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 151a0f69ee..d67a1ca032 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -228,6 +228,7 @@ public class Weapon implements Cloneable{ var part = parts.get(i); DrawPart.params.setRecoil(part.recoilIndex >= 0 && mount.recoils != null ? mount.recoils[part.recoilIndex] : mount.recoil); if(part.under){ + unit.type.applyColor(unit); part.draw(DrawPart.params); } } @@ -262,6 +263,7 @@ public class Weapon implements Cloneable{ var part = parts.get(i); DrawPart.params.setRecoil(part.recoilIndex >= 0 && mount.recoils != null ? mount.recoils[part.recoilIndex] : mount.recoil); if(!part.under){ + unit.type.applyColor(unit); part.draw(DrawPart.params); } }