New avert sprite / Fixed loading of CommandAI positions
This commit is contained in:
@@ -98,8 +98,8 @@ public class CommandAI extends AIController{
|
||||
}else if(local.size > 1){
|
||||
int count = 0;
|
||||
for(var near : local){
|
||||
//has arrived
|
||||
if(near.isCommandable() && !near.command().hasCommand() && targetPos.equals(near.command().lastTargetPos)){
|
||||
//has arrived - no current command, but last one is equal
|
||||
if(near.isCommandable() && !near.command().hasCommand() && targetPos.epsilonEquals(near.command().lastTargetPos, 0.001f)){
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
@@ -181,6 +181,11 @@ public class CommandAI extends AIController{
|
||||
return targetPos != null;
|
||||
}
|
||||
|
||||
public void setupLastPos(){
|
||||
lastTargetPos = targetPos;
|
||||
|
||||
}
|
||||
|
||||
public void commandPosition(Vec2 pos){
|
||||
targetPos = pos;
|
||||
lastTargetPos = pos;
|
||||
|
||||
Reference in New Issue
Block a user