示例#1
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;
	}
}
示例#2
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;
}
示例#3
0
bool CAI_Senses::Look( CBaseEntity *pSightEnt )
{
	if ( WaitingUntilSeen( pSightEnt ) )
		return false;
	
	if ( ShouldSeeEntity( pSightEnt ) && CanSeeEntity( pSightEnt ) )
	{
		return SeeEntity( pSightEnt );
	}
	return false;
}