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.

46 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: TF implementation of the IPresence interface
  4. //
  5. //=============================================================================
  6. #ifndef TF_PRESENCE_H
  7. #define TF_PRESENCE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "GameEventListener.h"
  12. #include "basepresence.h"
  13. #include "hl2orange.spa.h"
  14. //-----------------------------------------------------------------------------
  15. // Purpose: TF implementation for setting user contexts and properties.
  16. //-----------------------------------------------------------------------------
  17. class CTF_Presence : public CBasePresence, public CGameEventListener
  18. {
  19. public:
  20. // IGameEventListener Interface
  21. virtual void FireGameEvent( IGameEvent * event );
  22. // CBaseGameSystemPerFrame overrides
  23. virtual bool Init( void );
  24. virtual void LevelInitPreEntity( void );
  25. // IPresence interface
  26. virtual void SetupGameProperties( CUtlVector< XUSER_CONTEXT > &contexts, CUtlVector< XUSER_PROPERTY > &properties );
  27. virtual uint GetPresenceID( const char *pIDName );
  28. virtual const char *GetPropertyIdString( const unsigned int id );
  29. virtual void GetPropertyDisplayString( uint id, uint value, char *pOutput, int nBytes );
  30. virtual void UploadStats();
  31. private:
  32. bool m_bIsInCommentary;
  33. #if defined( _X360 )
  34. XSESSION_VIEW_PROPERTIES m_ViewProperties[3];
  35. #endif
  36. };
  37. #endif // TF_PRESENCE_H