mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 19:09:34 +07:00
Fixed negative recoil
This commit is contained in:
parent
60a430025a
commit
d43157fd22
@ -200,7 +200,7 @@ public class Weapon implements Cloneable{
|
||||
boolean can = unit.canShoot();
|
||||
float lastReload = mount.reload;
|
||||
mount.reload = Math.max(mount.reload - Time.delta * unit.reloadMultiplier, 0);
|
||||
mount.recoil = Mathf.approachDelta(mount.recoil, 0, (recoil * unit.reloadMultiplier) / recoilTime);
|
||||
mount.recoil = Mathf.approachDelta(mount.recoil, 0, (Math.abs(recoil) * unit.reloadMultiplier) / recoilTime);
|
||||
|
||||
//rotate if applicable
|
||||
if(rotate && (mount.rotate || mount.shoot) && can){
|
||||
|
Loading…
Reference in New Issue
Block a user