Fixed unit part progress with multiple weapons
This commit is contained in:
@@ -1282,9 +1282,9 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||||||
for(int i = 0; i < parts.size; i++){
|
for(int i = 0; i < parts.size; i++){
|
||||||
var part = parts.get(i);
|
var part = parts.get(i);
|
||||||
|
|
||||||
WeaponMount first = unit.mounts.length > part.weaponIndex ? unit.mounts[part.weaponIndex] : null;
|
WeaponMount mount = unit.mounts.length > part.weaponIndex ? unit.mounts[part.weaponIndex] : null;
|
||||||
if(first != null){
|
if(mount != null){
|
||||||
DrawPart.params.set(first.warmup, first.reload / weapons.first().reload, first.smoothReload, first.heat, first.recoil, first.charge, unit.x, unit.y, unit.rotation);
|
DrawPart.params.set(mount.warmup, mount.reload / mount.weapon.reload, mount.smoothReload, mount.heat, mount.recoil, mount.charge, unit.x, unit.y, unit.rotation);
|
||||||
}else{
|
}else{
|
||||||
DrawPart.params.set(0f, 0f, 0f, 0f, 0f, 0f, unit.x, unit.y, unit.rotation);
|
DrawPart.params.set(0f, 0f, 0f, 0f, 0f, 0f, unit.x, unit.y, unit.rotation);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user