From 2703c0cbc47a385baa8687ed98bd277f9c621c47 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Mon, 29 Aug 2022 14:23:20 -0700 Subject: [PATCH] alwaysShooting (#7475) --- core/src/mindustry/type/Weapon.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index d4b2517b57..22275a6c6c 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -51,6 +51,8 @@ public class Weapon implements Cloneable{ public boolean alwaysContinuous; /** whether this weapon can be aimed manually by players */ public boolean controllable = true; + /** whether this weapon is always shooting, regardless of targets ore cone */ + public boolean alwaysShooting = false; /** whether to automatically target relevant units in update(); only works when controllable = false. */ public boolean autoTarget = false; /** whether to perform target trajectory prediction */ @@ -323,6 +325,8 @@ public class Weapon implements Cloneable{ //logic will return shooting as false even if these return true, which is fine } + if(alwaysShooting) mount.shoot = true; + //update continuous state if(continuous && mount.bullet != null){ if(!mount.bullet.isAdded() || mount.bullet.time >= mount.bullet.lifetime || mount.bullet.type != bullet){