Validate teams with power links
This commit is contained in:
@@ -98,7 +98,7 @@ public class TractorBeamTurret extends BaseTurret{
|
||||
any = false;
|
||||
|
||||
//look at target
|
||||
if(target != null && target.within(this, range) && target.team() != team && target.checkTarget(targetAir, targetGround) && efficiency() > 0.02f){
|
||||
if(target != null && target.within(this, range + target.hitSize/2f) && target.team() != team && target.checkTarget(targetAir, targetGround) && efficiency() > 0.02f){
|
||||
if(!headless){
|
||||
control.sound.loop(shootSound, this, shootSoundVolume);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class RepairPoint extends Block{
|
||||
@Override
|
||||
public void updateTile(){
|
||||
boolean targetIsBeingRepaired = false;
|
||||
if(target != null && (target.dead() || target.dst(tile) > repairRadius || target.health() >= target.maxHealth())){
|
||||
if(target != null && (target.dead() || target.dst(tile) - target.hitSize/2f > repairRadius || target.health() >= target.maxHealth())){
|
||||
target = null;
|
||||
}else if(target != null && consValid()){
|
||||
target.heal(repairSpeed * Time.delta * strength * efficiency());
|
||||
|
||||
Reference in New Issue
Block a user