Skip to content

Commit

Permalink
Remove some logic of the ChaseGhost invocation condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
ll-nick committed Oct 18, 2024
1 parent 39c4b08 commit 4617b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/chase_ghost_behavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Command ChaseGhostBehavior::getCommand(const Time& time) {
}

bool ChaseGhostBehavior::checkInvocationCondition(const Time& time) const {
///@todo Also check if ghost is close by
return environmentModel_->closestScaredGhost(time).has_value() &&
environmentModel_->closestScaredGhost(time)->ghost.scaredCountdown > parameters_.minScaredTicksLeft &&
environmentModel_->closestScaredGhost(time)->distance < parameters_.invocationMinDistance;
environmentModel_->closestScaredGhost(time)->ghost.scaredCountdown > parameters_.minScaredTicksLeft;
}

bool ChaseGhostBehavior::checkCommitmentCondition(const Time& time) const {
Expand Down

0 comments on commit 4617b37

Please sign in to comment.