Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Sep 9, 2023
1 parent 5a050f1 commit b936442
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class HumanWanderTask extends DefaultTask implements PriorityTask {
private static final Logger logger = LoggerFactory.getLogger(HumanWanderTask.class);
private final float maxRange;
private final float waitTime;
private final Vector2 startPos;
private Vector2 startPos;
private HumanMovementTask movementTask;
private HumanWaitTask waitTask;
private EngineerCombatTask combatTask;
Expand All @@ -33,7 +33,6 @@ public class HumanWanderTask extends DefaultTask implements PriorityTask {
public HumanWanderTask(float waitTime, float maxRange) {
this.waitTime = waitTime;
this.maxRange = maxRange;
this.startPos = owner.getEntity().getCenterPosition();
}

@Override
Expand All @@ -44,6 +43,7 @@ public int getPriority() {
@Override
public void start() {
super.start();
this.startPos = owner.getEntity().getCenterPosition();
waitTask = new HumanWaitTask(waitTime);
waitTask.create(owner);

Expand Down Expand Up @@ -119,8 +119,6 @@ private void swapTask(Task newTask) {
}

private Vector2 getDirection() {
// float y = startPos.y;
// return new Vector2(0, y);
return this.startPos;
}
}

0 comments on commit b936442

Please sign in to comment.