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.

60 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Team management class. Contains all the details for a specific team
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CS_TEAM_H
  8. #define CS_TEAM_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "utlvector.h"
  13. #include "team.h"
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Team Manager
  16. //-----------------------------------------------------------------------------
  17. class CCSTeam : public CTeam
  18. {
  19. DECLARE_CLASS( CCSTeam, CTeam );
  20. public:
  21. virtual ~CCSTeam( void );
  22. DECLARE_SERVERCLASS();
  23. // Initialization
  24. virtual void Init( const char *pName, int iNumber );
  25. virtual void Precache( void );
  26. virtual void Think( void );
  27. //-----------------------------------------------------------------------------
  28. // Players
  29. //-----------------------------------------------------------------------------
  30. virtual void AddPlayer( CBasePlayer *pPlayer );
  31. virtual void RemovePlayer( CBasePlayer *pPlayer );
  32. //-----------------------------------------------------------------------------
  33. // Utility funcs
  34. //-----------------------------------------------------------------------------
  35. CCSTeam* GetEnemyTeam();
  36. private:
  37. // Used to distribute resources to a team
  38. float m_flNextResourceTime;
  39. int m_iLastUpdateSentAt;
  40. };
  41. extern CCSTeam *GetGlobalTFTeam( int iIndex );
  42. #endif // TF_TEAM_H