game_shared/bot/bot_util.h
inline bool IsEntityValid( CBaseEntity *entity )
{
	if (entity == NULL)
		return false;

	if (FNullEnt( entity->pev ))
		return false;

	if (FStrEq( STRING( entity->pev->netname ), "" ))
		return false;

	if (entity->pev->flags & FL_DORMANT)
		return false;

	return true;
}
//--------------------------------------------------------------------------------------------------------------
/**
 * Return true if the given entity is valid
 */
Return true if the given entity is valid
Return true if the given entity is valid
inline bool IsEntityValid( CBaseEntity *entity )
{
	if (entity == NULL)
		return false;
	if (FNullEnt( entity->pev ))
		return false;
	if (FStrEq( STRING( entity->pev->netname ), "" ))
		return false;
	if (entity->pev->flags & FL_DORMANT)
		return false;
	return true;
}
inline bool IsEntityValid ( CBaseEntity * entity ) { if ( entity == NULL ) return false ; if ( FNullEnt ( entity -> pev ) ) return false ; if ( FStrEq ( STRING ( entity -> pev -> netname ) , " " ) ) return false ; if ( entity -> pev -> flags & FL_DORMANT ) return false ; return true ; }
Return true if the given entity is valid
Return true if the given entity is valid