Commit 1a0ffa39 authored by drallensmith's avatar drallensmith

Cleanup on bhv_basic_move.cpp

parent b52d79a2
...@@ -61,7 +61,6 @@ Bhv_BasicMove::execute( PlayerAgent * agent ) ...@@ -61,7 +61,6 @@ Bhv_BasicMove::execute( PlayerAgent * agent )
dlog.addText( Logger::TEAM, dlog.addText( Logger::TEAM,
__FILE__": Bhv_BasicMove" ); __FILE__": Bhv_BasicMove" );
bool success = false; bool success = false;
bool maybe_success = true;
//----------------------------------------------- //-----------------------------------------------
// tackle // tackle
...@@ -95,11 +94,6 @@ Bhv_BasicMove::execute( PlayerAgent * agent ) ...@@ -95,11 +94,6 @@ Bhv_BasicMove::execute( PlayerAgent * agent )
const double dash_power = Strategy::get_normal_dash_power( wm ); const double dash_power = Strategy::get_normal_dash_power( wm );
const BallObject& ball = wm.ball(); const BallObject& ball = wm.ball();
if (! ball.rposValid()) {
if (! wm.self().collidesWithPost()) {
maybe_success = false;
}
}
double dist_thr = ball.distFromSelf() * 0.1; double dist_thr = ball.distFromSelf() * 0.1;
if ( dist_thr < 1.0 ) dist_thr = 1.0; if ( dist_thr < 1.0 ) dist_thr = 1.0;
...@@ -113,16 +107,17 @@ Bhv_BasicMove::execute( PlayerAgent * agent ) ...@@ -113,16 +107,17 @@ Bhv_BasicMove::execute( PlayerAgent * agent )
agent->debugClient().setTarget( target_point ); agent->debugClient().setTarget( target_point );
agent->debugClient().addCircle( target_point, dist_thr ); agent->debugClient().addCircle( target_point, dist_thr );
if ( ! Body_GoToPoint( target_point, dist_thr, dash_power
).execute( agent ) ) if ( Body_GoToPoint( target_point, dist_thr, dash_power
{ ).execute( agent ) ||
if (! Body_TurnToBall().execute( agent )) { Body_TurnToBall().execute( agent ) ) {
success = false; if (ball.rposValid() || wm.self().collidesWithPost()) {
success = true;
} else { } else {
success = maybe_success; success = false;
} }
} else { } else {
success = maybe_success; success = false;
} }
if ( wm.existKickableOpponent() && if ( wm.existKickableOpponent() &&
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <vector>
namespace hfo { namespace hfo {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment