Fixed recoil for continuous weapons with offset

This commit is contained in:
Anuken
2024-01-17 12:47:19 -05:00
parent 22b1639b6f
commit 0c233319d9

View File

@@ -366,7 +366,7 @@ public class Weapon implements Cloneable{
mount.bullet.set(bulletX, bulletY);
mount.reload = reload;
mount.recoil = 1f;
unit.vel.add(Tmp.v1.trns(unit.rotation + 180f, mount.bullet.type.recoil * Time.delta));
unit.vel.add(Tmp.v1.trns(mount.bullet.rotation() + 180f, mount.bullet.type.recoil * Time.delta));
if(shootSound != Sounds.none && !headless){
if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f);
mount.sound.update(bulletX, bulletY, true);