alwaysShooting (#7475)
This commit is contained in:
@@ -51,6 +51,8 @@ public class Weapon implements Cloneable{
|
|||||||
public boolean alwaysContinuous;
|
public boolean alwaysContinuous;
|
||||||
/** whether this weapon can be aimed manually by players */
|
/** whether this weapon can be aimed manually by players */
|
||||||
public boolean controllable = true;
|
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. */
|
/** whether to automatically target relevant units in update(); only works when controllable = false. */
|
||||||
public boolean autoTarget = false;
|
public boolean autoTarget = false;
|
||||||
/** whether to perform target trajectory prediction */
|
/** 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
|
//logic will return shooting as false even if these return true, which is fine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(alwaysShooting) mount.shoot = true;
|
||||||
|
|
||||||
//update continuous state
|
//update continuous state
|
||||||
if(continuous && mount.bullet != null){
|
if(continuous && mount.bullet != null){
|
||||||
if(!mount.bullet.isAdded() || mount.bullet.time >= mount.bullet.lifetime || mount.bullet.type != bullet){
|
if(!mount.bullet.isAdded() || mount.bullet.time >= mount.bullet.lifetime || mount.bullet.type != bullet){
|
||||||
|
|||||||
Reference in New Issue
Block a user