Commit 28c26906 authored by drallensmith's avatar drallensmith

Further feedback, cleanup changes

parent db768bb0
...@@ -673,9 +673,9 @@ Agent::doPreprocess() ...@@ -673,9 +673,9 @@ Agent::doPreprocess()
const int count_thr = ( wm.self().goalie() const int count_thr = ( wm.self().goalie()
? 10 ? 10
: 5 ); : 5 );
if ( wm.ball().posCount() < count_thr if ( wm.ball().posCount() > count_thr
|| ( wm.gameMode().type() != GameMode::PlayOn || ( wm.gameMode().type() != GameMode::PlayOn
&& wm.ball().seenPosCount() < count_thr + 10 ) ) && wm.ball().seenPosCount() > count_thr + 10 ) )
{ {
dlog.addText( Logger::TEAM, dlog.addText( Logger::TEAM,
__FILE__": search ball" ); __FILE__": search ball" );
...@@ -817,9 +817,9 @@ Agent::doReorient() ...@@ -817,9 +817,9 @@ Agent::doReorient()
const int count_thr = ( wm.self().goalie() const int count_thr = ( wm.self().goalie()
? 10 ? 10
: 5 ); : 5 );
if ( wm.ball().posCount() < count_thr if ( wm.ball().posCount() > count_thr
|| ( wm.gameMode().type() != GameMode::PlayOn || ( wm.gameMode().type() != GameMode::PlayOn
&& wm.ball().seenPosCount() < count_thr + 10 ) ) && wm.ball().seenPosCount() > count_thr + 10 ) )
{ {
dlog.addText( Logger::TEAM, dlog.addText( Logger::TEAM,
__FILE__": search ball" ); __FILE__": search ball" );
...@@ -935,7 +935,6 @@ bool ...@@ -935,7 +935,6 @@ bool
Agent::doMove() Agent::doMove()
{ {
Strategy::instance().update( world() ); Strategy::instance().update( world() );
int role_num = Strategy::i().roleNumber(world().self().unum()); // Unused?
return Bhv_BasicMove().execute(this); return Bhv_BasicMove().execute(this);
} }
......
...@@ -107,15 +107,13 @@ Bhv_BasicMove::execute( PlayerAgent * agent ) ...@@ -107,15 +107,13 @@ Bhv_BasicMove::execute( PlayerAgent * agent )
agent->debugClient().addCircle( target_point, dist_thr ); agent->debugClient().addCircle( target_point, dist_thr );
bool success = false; bool success = false;
if (ball.posValid() || wm.self().collidesWithPost()) {
success = true;
}
if ( Body_GoToPoint( target_point, dist_thr, dash_power if ( Body_GoToPoint( target_point, dist_thr, dash_power
).execute( agent ) ) { ).execute( agent ) ||
// OK Body_TurnToBall().execute( agent ) ) {
} else if (Body_TurnToBall().execute( agent ) ) { if (ball.posValid() || wm.self().collidesWithPost()) {
// OK success = true;
}
} else { } else {
success = false; success = false;
} }
......
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