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.

40 lines
1.2 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. #include "cbase.h"
  8. #include "sdk_team.h"
  9. #include "entitylist.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include "tier0/memdbgon.h"
  12. // Datatable
  13. IMPLEMENT_SERVERCLASS_ST(CSDKTeam, DT_SDKTeam)
  14. END_SEND_TABLE()
  15. LINK_ENTITY_TO_CLASS( sdk_team_manager, CSDKTeam );
  16. //-----------------------------------------------------------------------------
  17. // Purpose: Get a pointer to the specified TF team manager
  18. //-----------------------------------------------------------------------------
  19. CSDKTeam *GetGlobalSDKTeam( int iIndex )
  20. {
  21. return (CSDKTeam*)GetGlobalTeam( iIndex );
  22. }
  23. //-----------------------------------------------------------------------------
  24. // Purpose: Needed because this is an entity, but should never be used
  25. //-----------------------------------------------------------------------------
  26. void CSDKTeam::Init( const char *pName, int iNumber )
  27. {
  28. BaseClass::Init( pName, iNumber );
  29. // Only detect changes every half-second.
  30. NetworkProp()->SetUpdateInterval( 0.75f );
  31. }