void CAIGoalFollowFootprint::HandleStateFollowFootprint() { switch( m_pAI->GetState()->GetStateStatus() ) { case kSStat_Initialized: break; case kSStat_FailedComplete: m_pAI->SetState( kState_HumanAware ); m_pGoalMgr->UnlockGoal(this); break; case kSStat_StateComplete: { // Search or go aware. if( (m_pAI->IsMajorlyAlarmed() || m_bSearch) && m_pAI->CanSearch()) { SetStateSearch(); } else { m_pAI->SetState( kState_HumanAware ); m_pGoalMgr->UnlockGoal(this); } } break; // Unexpected StateStatus. default: ASSERT(!"CAIGoalFollowFootprint::HandleStateFollowFootprint: Unexpected State Status."); } }
void CAIGoalAbstractSearch::HandleStateSearch() { switch( m_pAI->GetState()->GetStateStatus() ) { case kSStat_Initialized: break; case kSStat_FailedEngage: m_pGoalMgr->UnlockGoal(this); m_pAI->SetState( kState_HumanAware ); break; case kSStat_StateComplete: if( !m_lstRegions.empty() ) { m_pAI->SetState( kState_HumanIdle ); SetStateSearch(); } else { m_pGoalMgr->UnlockGoal(this); m_pAI->SetState( kState_HumanAware ); } break; // Unexpected StateStatus. default: AIASSERT(0, m_pAI->m_hObject, "CAIGoalAbstractSearch::HandleStateSearch: Unexpected State Status."); } }
void CAIGoalAbstractSearch::HandleStateDraw() { switch( m_pAI->GetState()->GetStateStatus() ) { case kSStat_Initialized: break; case kSStat_FailedComplete: m_pGoalMgr->UnlockGoal( this ); m_fCurImportance = 0.f; break; case kSStat_StateComplete: SetStateSearch(); break; // Unexpected StateStatus. default: AIASSERT(0, m_pAI->m_hObject, "CAIGoalAbstractSearch::HandleStateDraw: Unexpected State Status."); } }
//---------------------------------------------------------------------------- // // ROUTINE: CAIGoalResurrecting::HandleStateResurrecting() // // PURPOSE: // //---------------------------------------------------------------------------- void CAIGoalResurrecting::HandleStateResurrecting() { switch( m_pAI->GetState()->GetStateStatus() ) { case kSStat_Initialized: break; case kSStat_Resurrecting: break; case kSStat_RegainingConsciousness: break; case kSStat_Conscious: { // Reset AIs default senses, from aibutes.txt. m_pAI->ResetBaseSenseFlags(); m_pGoalMgr->UnlockGoal(this); if ( m_pAI->CanSearch() ) { // Search. SetStateSearch(); } else { // Go aware. m_pAI->SetState( kState_HumanAware ); } // Set the importance to something fairly low, so that // anything else will be preferable. SetCurImportance( 8 ); } break; // Unexpected StateStatus. default: AIASSERT(0, m_pAI->m_hObject, "CAIGoalUnconscious::HandleStateUnconscious: Unexpected State Status."); } }
void CAIGoalRespondToBackup::HandleStateGoto() { switch( m_pAI->GetState()->GetStateStatus() ) { case kSStat_Initialized: break; case kSStat_StateComplete: if(m_pAI->CanSearch()) { SetStateSearch(); } else { m_pGoalMgr->UnlockGoal(this); m_pAI->SetState( kState_HumanAware ); } break; // Unexpected StateStatus. default: AIASSERT(0, m_pAI->m_hObject, "CAIGoalGetBackup::HandleStateGoto: Unexpected State Status."); } }