mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-07 05:50:54 +07:00
Fix negative recoil (#6107)
This commit is contained in:
parent
df5c31a0e7
commit
a4963f351d
@ -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 = Math.max(mount.recoil - (Time.delta * recoil * unit.reloadMultiplier) / recoilTime, 0);
|
||||
mount.recoil = Mathf.approachDelta(mount.recoil, 0, (recoil * unit.reloadMultiplier) / recoilTime);
|
||||
|
||||
//rotate if applicable
|
||||
if(rotate && (mount.rotate || mount.shoot) && can){
|
||||
|
Loading…
Reference in New Issue
Block a user