Player-only weapons (#6010)

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
MEEPofFaith
2022-10-01 14:42:57 -07:00
committed by GitHub
parent f89e69b2f6
commit 2e98abc86e
2 changed files with 7 additions and 0 deletions

View File

@@ -147,6 +147,11 @@ public class AIController implements UnitController{
//let uncontrollable weapons do their own thing
if(!weapon.controllable || weapon.noAttack) continue;
if(!weapon.aiControllable){
mount.rotate = false;
continue;
}
float mountX = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y),
mountY = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y);

View File

@@ -53,6 +53,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 can be automatically aimed by the unit */
public boolean aiControllable = 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. */