コード例 #1
0
ファイル: ai_senses.cpp プロジェクト: BerntA/tfo-code
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;
}