Made RepairAI only move toward ally buildings

This commit is contained in:
Anuken
2020-11-19 13:30:59 -05:00
parent c468bdef6d
commit aef6ac4335
2 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ public class RepairAI extends AIController{
}
if(target != null){
if(!target.within(unit, unit.type.range * 0.65f) && target instanceof Building){
if(!target.within(unit, unit.type.range * 0.65f) && target instanceof Building b && b.team == unit.team){
moveTo(target, unit.type.range * 0.65f);
}