File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -899,9 +899,16 @@ void GrpcClientPlayer::getActions()
899899 rcsc::dlog.addText ( rcsc::Logger::TEAM, __FILE__" : Neck_ScanPlayers failed" );
900900 }
901901 }
902- else if (action.action_case () == PlayerAction::kBhvGoalieFreeKick ) {
903- Bhv_GoalieFreeKick ().execute (agent);
904- agent->debugClient ().addMessage (" Bhv_GoalieFreeKick" );
902+ else if (action.action_case () == PlayerAction::kBhvGoalieFreeKick && !action_performed) {
903+ if (Bhv_GoalieFreeKick ().execute (agent))
904+ {
905+ action_performed = true ;
906+ rcsc::dlog.addText ( rcsc::Logger::TEAM, __FILE__" : Bhv_GoalieFreeKick performed" );
907+ }
908+ else
909+ {
910+ rcsc::dlog.addText ( rcsc::Logger::TEAM, __FILE__" : Bhv_GoalieFreeKick failed" );
911+ }
905912 }
906913 else if (action.action_case () == PlayerAction::kNeckTurnToBallAndPlayer ) {
907914 const auto &neckTurnToBallAndPlayer = action.neck_turn_to_ball_and_player ();
You can’t perform that action at this time.
0 commit comments