Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #if !defined( ICLIENTENTITYLIST_H )
  10. #define ICLIENTENTITYLIST_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "interface.h"
  15. class IClientEntity;
  16. class ClientClass;
  17. class IClientNetworkable;
  18. class CBaseHandle;
  19. class IClientUnknown;
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Exposes IClientEntity's to engine
  22. //-----------------------------------------------------------------------------
  23. abstract_class IClientEntityList
  24. {
  25. public:
  26. // Get IClientNetworkable interface for specified entity
  27. virtual IClientNetworkable* GetClientNetworkable( int entnum ) = 0;
  28. virtual IClientNetworkable* GetClientNetworkableFromHandle( CBaseHandle hEnt ) = 0;
  29. virtual IClientUnknown* GetClientUnknownFromHandle( CBaseHandle hEnt ) = 0;
  30. // NOTE: This function is only a convenience wrapper.
  31. // It returns GetClientNetworkable( entnum )->GetIClientEntity().
  32. virtual IClientEntity* GetClientEntity( int entnum ) = 0;
  33. virtual IClientEntity* GetClientEntityFromHandle( CBaseHandle hEnt ) = 0;
  34. // Returns number of entities currently in use
  35. virtual int NumberOfEntities( bool bIncludeNonNetworkable ) = 0;
  36. // Returns highest index actually used
  37. virtual int GetHighestEntityIndex( void ) = 0;
  38. // Sizes entity list to specified size
  39. virtual void SetMaxEntities( int maxents ) = 0;
  40. virtual int GetMaxEntities( ) = 0;
  41. };
  42. extern IClientEntityList *entitylist;
  43. #define VCLIENTENTITYLIST_INTERFACE_VERSION "VClientEntityList003"
  44. #endif // ICLIENTENTITYLIST_H