diff --git a/roboteam_ai/src/utilities/StrategyManager.cpp b/roboteam_ai/src/utilities/StrategyManager.cpp index f1b2a3219..694883cdf 100644 --- a/roboteam_ai/src/utilities/StrategyManager.cpp +++ b/roboteam_ai/src/utilities/StrategyManager.cpp @@ -10,7 +10,7 @@ void StrategyManager::setCurrentGameState(RefCommand command, RefCommand nextCom lastCommand = command; return; } - + if (command == RefCommand::STOP && (nextCommand == RefCommand::PREPARE_KICKOFF_THEM || nextCommand == RefCommand::PREPARE_KICKOFF_US || nextCommand == RefCommand::PREPARE_PENALTY_THEM || nextCommand == RefCommand::PREPARE_PENALTY_US)) { command = nextCommand; @@ -35,7 +35,7 @@ void StrategyManager::setCurrentGameState(RefCommand command, RefCommand nextCom if ((currentGameState.commandId == RefCommand::DIRECT_FREE_THEM || currentGameState.commandId == RefCommand::DIRECT_FREE_US || currentGameState.commandId == RefCommand::KICKOFF_US || currentGameState.commandId == RefCommand::KICKOFF_THEM) && - ballOpt.has_value() && (ballOpt.value()->velocity.length() > stp::control_constants::BALL_GOT_SHOT_LIMIT || currentGameState.timeLeft < -0.5)) { + ballOpt.has_value() && (ballOpt.value()->velocity.length() > stp::control_constants::BALL_GOT_SHOT_LIMIT || currentGameState.timeLeft < 0.0)) { currentGameState = getGameStateForRefCommand(RefCommand::NORMAL_START); lastCommand = command; return;