Пример #1
0
bool CAI_Senses::LookThroughPortal( const CProp_Portal *pPortal, CBaseEntity *pSightEnt )
{
	if ( WaitingUntilSeen( pSightEnt ) )
		return false;

	if ( ShouldSeeEntity( pSightEnt ) && CanSeeEntityThroughPortal( pPortal, pSightEnt ) )
	{
		return SeeEntity( pSightEnt );
	}
	return false;
}
Пример #2
0
bool CASW_AI_Senses::CanSwarmSense( CBaseEntity *pSightEnt )
{
	if ( WaitingUntilSeen( pSightEnt ) )
		return false;
	
	if ( ShouldSeeEntity( pSightEnt ) )	// && CanSeeEntity( pSightEnt )  // can always swarm sense things in our search radius
	{
		return SwarmSenseEntity( pSightEnt );
	}
	return false;
}
Пример #3
0
bool CAI_Senses::Look( CBaseEntity *pSightEnt )
{
	if ( WaitingUntilSeen( pSightEnt ) )
		return false;
	
	if ( ShouldSeeEntity( pSightEnt ) && CanSeeEntity( pSightEnt ) )
	{
		return SeeEntity( pSightEnt );
	}
	return false;
}
Пример #4
0
bool CAI_Senses::Look( CBaseEntity *pSightEnt )
{
	CNPC_BaseZombie *pZombie = dynamic_cast<CNPC_BaseZombie*>( GetOuter() );
	if ( pZombie && pSightEnt->IsPlayer() )
	{
		return SeeEntity( pSightEnt );
	}
	else
	{
		if ( WaitingUntilSeen( pSightEnt ) )
			return false;
	
		if ( ShouldSeeEntity( pSightEnt ) && CanSeeEntity( pSightEnt ) )
		{
			return SeeEntity( pSightEnt );
		}
		return false;
	}
}