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.

68 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Client side CTFTeam class
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef C_TF_TEAM_H
  8. #define C_TF_TEAM_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "c_team.h"
  13. #include "shareddefs.h"
  14. #include "c_baseobject.h"
  15. class C_BaseEntity;
  16. class C_BaseObject;
  17. class CBaseTechnology;
  18. class C_TFPlayer;
  19. //-----------------------------------------------------------------------------
  20. // Purpose: TF's Team manager
  21. //-----------------------------------------------------------------------------
  22. class C_TFTeam : public C_Team
  23. {
  24. DECLARE_CLASS( C_TFTeam, C_Team );
  25. DECLARE_CLIENTCLASS();
  26. public:
  27. C_TFTeam();
  28. virtual ~C_TFTeam();
  29. int GetFlagCaptures( void ) { return m_nFlagCaptures; }
  30. int GetRole( void ) { return m_iRole; }
  31. char *Get_Name( void );
  32. int GetNumObjects( int iObjectType = -1 );
  33. CBaseObject *GetObject( int num );
  34. CUtlVector< CHandle<C_BaseObject> > m_aObjects;
  35. C_BasePlayer *GetTeamLeader( void );
  36. void UpdateTeamName( void );
  37. const wchar_t *Get_Localized_Name( void ){ return m_wzTeamname; };
  38. virtual void OnDataChanged( DataUpdateType_t updateType ) OVERRIDE;
  39. bool IsUsingCustomTeamName( void ) { return m_bUsingCustomTeamName; }
  40. // IClientThinkable override
  41. virtual void ClientThink();
  42. private:
  43. int m_nFlagCaptures;
  44. int m_iRole;
  45. CNetworkHandle( C_BasePlayer, m_hLeader );
  46. wchar_t m_wzTeamname[ MAX_TEAM_NAME_LENGTH ];
  47. bool m_bUsingCustomTeamName;
  48. };
  49. C_TFTeam *GetGlobalTFTeam( int iTeamNumber );
  50. #endif // C_TF_TEAM_H