Run applyColor before drawing unit parts (#9547)

* Run applyColor before drawing unit parts

* Run applyColor before drawing weapon parts
This commit is contained in:
MEEPofFaith
2024-04-09 07:52:41 -07:00
committed by GitHub
parent fec423213f
commit 17913f8949
2 changed files with 3 additions and 0 deletions

View File

@@ -1270,6 +1270,7 @@ public class UnitType extends UnlockableContent implements Senseable{
DrawPart.params.life = s.fin();
}
applyColor(unit);
part.draw(DrawPart.params);
}
}

View File

@@ -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);
}
}