add playerControllable for turrets (#6019)
This commit is contained in:
@@ -66,6 +66,7 @@ public class Turret extends ReloadTurret{
|
|||||||
public boolean targetAir = true;
|
public boolean targetAir = true;
|
||||||
public boolean targetGround = true;
|
public boolean targetGround = true;
|
||||||
public boolean targetHealing = false;
|
public boolean targetHealing = false;
|
||||||
|
public boolean playerControllable = true;
|
||||||
|
|
||||||
//charging
|
//charging
|
||||||
public float chargeTime = -1f;
|
public float chargeTime = -1f;
|
||||||
@@ -157,6 +158,11 @@ public class Turret extends ReloadTurret{
|
|||||||
unit.tile(this);
|
unit.tile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canControl(){
|
||||||
|
return playerControllable;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void control(LAccess type, double p1, double p2, double p3, double p4){
|
public void control(LAccess type, double p1, double p2, double p3, double p4){
|
||||||
if(type == LAccess.shoot && (unit == null || !unit.isPlayer())){
|
if(type == LAccess.shoot && (unit == null || !unit.isPlayer())){
|
||||||
|
|||||||
Reference in New Issue
Block a user