Commit b5d86649 authored by drallensmith's avatar drallensmith

Move around stuff from doPreprocess in doReorient - reflect purpose of action...

Move around stuff from doPreprocess in doReorient - reflect purpose of action as alertness to surroundings

(cherry picked from commit 3c914492)
parent c8ea54db
...@@ -603,7 +603,7 @@ Agent::doPreprocess() ...@@ -603,7 +603,7 @@ Agent::doPreprocess()
__FILE__": (doPreProcess)" ); __FILE__": (doPreProcess)" );
// //
// freezed by tackle effect // frozen by tackle effect
// //
if ( wm.self().isFrozen() ) if ( wm.self().isFrozen() )
{ {
...@@ -728,11 +728,7 @@ Agent::doReorient() ...@@ -728,11 +728,7 @@ Agent::doReorient()
__FILE__": tackle wait. expires= %d", __FILE__": tackle wait. expires= %d",
wm.self().tackleExpires() ); wm.self().tackleExpires() );
if (Bhv_Emergency().execute( this )){ // includes change view return Bhv_Emergency().execute( this )); // includes change view
return ACTION_STATUS_MAYBE;
} else {
return ACTION_STATUS_UNKNOWN;
}
} }
// //
...@@ -761,8 +757,7 @@ Agent::doReorient() ...@@ -761,8 +757,7 @@ Agent::doReorient()
dlog.addText( Logger::TEAM, dlog.addText( Logger::TEAM,
__FILE__": invalid my vel" ); __FILE__": invalid my vel" );
} }
Bhv_Emergency().execute( this ); // includes change view return Bhv_Emergency().execute( this ); // includes change view
return true;
} }
// //
...@@ -783,22 +778,10 @@ Agent::doReorient() ...@@ -783,22 +778,10 @@ Agent::doReorient()
{ {
dlog.addText( Logger::TEAM, dlog.addText( Logger::TEAM,
__FILE__": search ball" ); __FILE__": search ball" );
Bhv_NeckBodyToBall().execute( this ); return Bhv_NeckBodyToBall().execute( this );
return true;
} }
//
// check queued action
//
if ( this->doIntention() )
{
dlog.addText( Logger::TEAM,
__FILE__": do queued intention" );
return true;
}
// //
// check pass message // check pass message
// //
...@@ -811,10 +794,18 @@ Agent::doReorient() ...@@ -811,10 +794,18 @@ Agent::doReorient()
if (! ( ball.rposValid() && ball.velValid() )) { if (! ( ball.rposValid() && ball.velValid() )) {
dlog.addText( Logger::TEAM, dlog.addText( Logger::TEAM,
__FILE__": search ball" ); __FILE__": search ball" );
Bhv_NeckBodyToBall().execute( this ); return Bhv_NeckBodyToBall().execute( this );
return true; }
//
// check queued action
//
if ( this->doIntention() )
{
dlog.addText( Logger::TEAM,
__FILE__": do queued intention" );
return true;
} }
return false; return 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