Fixed Quad Repair AI
This commit is contained in:
@@ -115,7 +115,7 @@ public class BuilderAI extends AIController{
|
|||||||
}else{
|
}else{
|
||||||
|
|
||||||
if(assistFollowing != null){
|
if(assistFollowing != null){
|
||||||
moveTo(assistFollowing, assistFollowing.type.hitSize * 1.5f + 60f);
|
moveTo(assistFollowing, assistFollowing.type.hitSize + unit.type.hitSize/2f + 60f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//follow someone and help them build
|
//follow someone and help them build
|
||||||
|
|||||||
@@ -28,12 +28,14 @@ public class RepairAI extends AIController{
|
|||||||
unit.controlWeapons(false);
|
unit.controlWeapons(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(target != null){
|
if(target != null && target instanceof Building b && b.team == unit.team){
|
||||||
if(!target.within(unit, unit.type.range * 0.65f) && target instanceof Building b && b.team == unit.team){
|
if(unit.type.circleTarget){
|
||||||
|
circleAttack(120f);
|
||||||
|
}else if(!target.within(unit, unit.type.range * 0.65f)){
|
||||||
moveTo(target, unit.type.range * 0.65f);
|
moveTo(target, unit.type.range * 0.65f);
|
||||||
}
|
|
||||||
|
|
||||||
unit.lookAt(target);
|
unit.lookAt(target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//not repairing
|
//not repairing
|
||||||
|
|||||||
@@ -781,10 +781,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
if(commands.length == 0){
|
if(commands.length == 0){
|
||||||
Seq<UnitCommand> cmds = new Seq<>(UnitCommand.class);
|
Seq<UnitCommand> cmds = new Seq<>(UnitCommand.class);
|
||||||
|
|
||||||
//TODO ????
|
cmds.add(UnitCommand.moveCommand);
|
||||||
//if(canAttack){
|
|
||||||
cmds.add(UnitCommand.moveCommand);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//healing, mining and building is only supported for flying units; pathfinding to ambiguously reachable locations is hard.
|
//healing, mining and building is only supported for flying units; pathfinding to ambiguously reachable locations is hard.
|
||||||
if(flying){
|
if(flying){
|
||||||
|
|||||||
Reference in New Issue
Block a user