mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Fixed unit part progress with multiple weapons
This commit is contained in:
parent
bd4b56857e
commit
92e121c05c
@ -1282,9 +1282,9 @@ public class UnitType extends UnlockableContent implements Senseable{
|
||||
for(int i = 0; i < parts.size; i++){
|
||||
var part = parts.get(i);
|
||||
|
||||
WeaponMount first = unit.mounts.length > part.weaponIndex ? unit.mounts[part.weaponIndex] : null;
|
||||
if(first != 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);
|
||||
WeaponMount mount = unit.mounts.length > part.weaponIndex ? unit.mounts[part.weaponIndex] : null;
|
||||
if(mount != null){
|
||||
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{
|
||||
DrawPart.params.set(0f, 0f, 0f, 0f, 0f, 0f, unit.x, unit.y, unit.rotation);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user