type.speed -> speed()
This commit is contained in:
@@ -79,7 +79,7 @@ public class BuilderAI extends AIController{
|
||||
float dist = Math.min(cons.dst(unit) - buildingRange, 0);
|
||||
|
||||
//make sure you can reach the request in time
|
||||
if(dist / unit.type.speed < cons.buildCost * 0.9f){
|
||||
if(dist / unit.speed() < cons.buildCost * 0.9f){
|
||||
following = b;
|
||||
found = true;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FlyingAI extends AIController{
|
||||
vec.setAngle(Mathf.slerpDelta(unit.vel().angle(), vec.angle(), 0.6f));
|
||||
}
|
||||
|
||||
vec.setLength(unit.type.speed);
|
||||
vec.setLength(unit.speed());
|
||||
|
||||
unit.moveAt(vec);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SuicideAI extends GroundAI{
|
||||
if(!blocked){
|
||||
moveToTarget = true;
|
||||
//move towards target directly
|
||||
unit.moveAt(vec.set(target).sub(unit).limit(unit.type.speed));
|
||||
unit.moveAt(vec.set(target).sub(unit).limit(unit.speed()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user