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.

58 lines
1.4 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 TFC_TEAM_H
  8. #define TFC_TEAM_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "utlvector.h"
  13. #include "team.h"
  14. #include "tfc_shareddefs.h"
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Team Manager
  17. //-----------------------------------------------------------------------------
  18. class CTFCTeam : public CTeam
  19. {
  20. DECLARE_CLASS( CTFCTeam, CTeam );
  21. DECLARE_SERVERCLASS();
  22. public:
  23. // Initialization
  24. virtual void Init( const char *pName, int iNumber );
  25. color32 GetTeamColor();
  26. };
  27. extern CTFCTeam *GetGlobalTFCTeam( int iIndex );
  28. void TeamFortress_TeamShowScores(BOOL bLong, CBasePlayer *pPlayer);
  29. int TeamFortress_TeamGetScoreFrags(int tno);
  30. // Colors for each team.
  31. typedef struct
  32. {
  33. int topColor;
  34. int bottomColor;
  35. } team_color_t;
  36. extern Vector rgbcolors[5];
  37. extern team_color_t teamcolors[5][PC_LASTCLASS]; // Colors for each of the 4 teams
  38. extern int number_of_teams; // This is incremented for each map as info_player_teamspawn are created.
  39. extern const char *teamnames[5];
  40. #define g_szTeamColors teamnames
  41. color32 Vector255ToRGBColor( const Vector &vColor );
  42. #endif // TF_TEAM_H