Commit 28c26906 authored by drallensmith's avatar drallensmith

Further feedback, cleanup changes

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