Run applyColor before drawing unit parts (#9547)
* Run applyColor before drawing unit parts * Run applyColor before drawing weapon parts
This commit is contained in:
@@ -1270,6 +1270,7 @@ public class UnitType extends UnlockableContent implements Senseable{
|
||||
DrawPart.params.life = s.fin();
|
||||
}
|
||||
|
||||
applyColor(unit);
|
||||
part.draw(DrawPart.params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user