game/server/shit/npc_alien_trooper.cpp
void CSTrooper :: PrescheduleThink ( void )
{
	if ( InSquad() && m_hEnemy != NULL )
	{
		if ( HasConditions ( bits_COND_SEE_ENEMY ) )
		{
			// update the squad's last enemy sighting time.
			MySquadLeader()->m_flLastEnemySightTime = gpGlobals->time;
		}
		else
		{
			if ( gpGlobals->time - MySquadLeader()->m_flLastEnemySightTime > 5 )
			{
				// been a while since we've seen the enemy
				MySquadLeader()->m_fEnemyEluded = TRUE;
			}
		}
	}
}
//=========================================================
// PrescheduleThink - this function runs after conditions
// are collected and before scheduling code is run.
//=========================================================
this function runs after conditions
are collected and before scheduling code is run.
this function runs after conditions are collected and before scheduling code is run .
void CSTrooper :: PrescheduleThink ( void )
{
	if ( InSquad() && m_hEnemy != NULL )
	{
		if ( HasConditions ( bits_COND_SEE_ENEMY ) )
		{
			MySquadLeader()->m_flLastEnemySightTime = gpGlobals->time;
		}
		else
		{
			if ( gpGlobals->time - MySquadLeader()->m_flLastEnemySightTime > 5 )
			{
				MySquadLeader()->m_fEnemyEluded = TRUE;
			}
		}
	}
}
void CSTrooper :: PrescheduleThink ( void ) { if ( InSquad ( ) && m_hEnemy != NULL ) { if ( HasConditions ( bits_COND_SEE_ENEMY ) ) { MySquadLeader ( ) -> m_flLastEnemySightTime = gpGlobals -> time ; } else { if ( gpGlobals -> time - MySquadLeader ( ) -> m_flLastEnemySightTime > 5 ) { MySquadLeader ( ) -> m_fEnemyEluded = TRUE ; } } } }
PrescheduleThink - this function runs after conditions
are collected and before scheduling code is run.
PrescheduleThink - this function runs after conditions are collected and before scheduling code is run .
// update the squad's last enemy sighting time. // been a while since we've seen the enemy