//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- CAI_Hint *CAI_FearBehavior::FindFearWithdrawalDest() { CAI_Hint *pHint; CHintCriteria hintCriteria; CAI_BaseNPC *pOuter = GetOuter(); Assert(pOuter != NULL); hintCriteria.AddHintType( HINT_PLAYER_ALLY_FEAR_DEST ); hintCriteria.SetFlag( bits_HINT_NODE_VISIBLE_TO_PLAYER | bits_HINT_NOT_CLOSE_TO_ENEMY /*| bits_HINT_NODE_IN_VIEWCONE | bits_HINT_NPC_IN_NODE_FOV*/ ); hintCriteria.AddIncludePosition( AI_GetSinglePlayer()->GetAbsOrigin(), ( ai_fear_player_dist.GetFloat() ) ); pHint = CAI_HintManager::FindHint( pOuter, hintCriteria ); if( pHint ) { // Reserve this node while I try to get to it. When I get there I will lock it. // Otherwise, if I fail to get there, the node will come available again soon. pHint->DisableForSeconds( 4.0f ); } #if 0 else { Msg("DID NOT FIND HINT\n"); NDebugOverlay::Cross3D( GetOuter()->WorldSpaceCenter(), 32, 255, 255, 0, false, 10.0f ); } #endif return pHint; }