targetUnderBlocks for units (#8160)
* targetUnderBlocks for units You know, why don't units use the same targeting code as turrets? * prioritize non-under blocks
This commit is contained in:
@@ -227,7 +227,7 @@ public class AIController implements UnitController{
|
||||
}
|
||||
|
||||
public Teamc target(float x, float y, float range, boolean air, boolean ground){
|
||||
return Units.closestTarget(unit.team, x, y, range, u -> u.checkTarget(air, ground), t -> ground);
|
||||
return Units.closestTarget(unit.team, x, y, range, u -> u.checkTarget(air, ground), t -> ground && (unit.type.targetUnderBlocks || !t.block.underBullets));
|
||||
}
|
||||
|
||||
public boolean retarget(){
|
||||
|
||||
Reference in New Issue
Block a user