Fixed recoil for continuous weapons with offset
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user