diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/server/team.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/server/team.h')
| -rw-r--r-- | sp/src/game/server/team.h | 202 |
1 files changed, 101 insertions, 101 deletions
diff --git a/sp/src/game/server/team.h b/sp/src/game/server/team.h index f8510771..cdbe16da 100644 --- a/sp/src/game/server/team.h +++ b/sp/src/game/server/team.h @@ -1,101 +1,101 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Team management class. Contains all the details for a specific team
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef TEAM_H
-#define TEAM_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "shareddefs.h"
-#include "utlvector.h"
-
-class CBasePlayer;
-class CTeamSpawnPoint;
-
-class CTeam : public CBaseEntity
-{
- DECLARE_CLASS( CTeam, CBaseEntity );
-public:
- CTeam( void );
- virtual ~CTeam( void );
-
- DECLARE_SERVERCLASS();
-
- virtual void Precache( void ) { return; };
-
- virtual void Think( void );
- virtual int UpdateTransmitState( void );
-
- //-----------------------------------------------------------------------------
- // Initialization
- //-----------------------------------------------------------------------------
- virtual void Init( const char *pName, int iNumber );
-
- //-----------------------------------------------------------------------------
- // Data Handling
- //-----------------------------------------------------------------------------
- virtual int GetTeamNumber( void ) const;
- virtual const char *GetName( void );
- virtual void UpdateClientData( CBasePlayer *pPlayer );
- virtual bool ShouldTransmitToPlayer( CBasePlayer* pRecipient, CBaseEntity* pEntity );
-
- //-----------------------------------------------------------------------------
- // Spawnpoints
- //-----------------------------------------------------------------------------
- virtual void InitializeSpawnpoints( void );
- virtual void AddSpawnpoint( CTeamSpawnPoint *pSpawnpoint );
- virtual void RemoveSpawnpoint( CTeamSpawnPoint *pSpawnpoint );
- virtual CBaseEntity *SpawnPlayer( CBasePlayer *pPlayer );
-
- //-----------------------------------------------------------------------------
- // Players
- //-----------------------------------------------------------------------------
- virtual void InitializePlayers( void );
- virtual void AddPlayer( CBasePlayer *pPlayer );
- virtual void RemovePlayer( CBasePlayer *pPlayer );
- virtual int GetNumPlayers( void );
- virtual CBasePlayer *GetPlayer( int iIndex );
-
- //-----------------------------------------------------------------------------
- // Scoring
- //-----------------------------------------------------------------------------
- virtual void AddScore( int iScore );
- virtual void SetScore( int iScore );
- virtual int GetScore( void );
- virtual void ResetScores( void );
-
- // Round scoring
- virtual int GetRoundsWon( void ) { return m_iRoundsWon; }
- virtual void SetRoundsWon( int iRounds ) { m_iRoundsWon = iRounds; }
- virtual void IncrementRoundsWon( void ) { m_iRoundsWon++; }
-
- void AwardAchievement( int iAchievement );
-
- virtual int GetAliveMembers( void );
-
-public:
- CUtlVector< CTeamSpawnPoint * > m_aSpawnPoints;
- CUtlVector< CBasePlayer * > m_aPlayers;
-
- // Data
- CNetworkString( m_szTeamname, MAX_TEAM_NAME_LENGTH );
- CNetworkVar( int, m_iScore );
- CNetworkVar( int, m_iRoundsWon );
- int m_iDeaths;
-
- // Spawnpoints
- int m_iLastSpawn; // Index of the last spawnpoint used
-
- CNetworkVar( int, m_iTeamNum ); // Which team is this?
-};
-
-extern CUtlVector< CTeam * > g_Teams;
-extern CTeam *GetGlobalTeam( int iIndex );
-extern int GetNumberOfTeams( void );
-
-#endif // TEAM_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Team management class. Contains all the details for a specific team +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef TEAM_H +#define TEAM_H +#ifdef _WIN32 +#pragma once +#endif + +#include "shareddefs.h" +#include "utlvector.h" + +class CBasePlayer; +class CTeamSpawnPoint; + +class CTeam : public CBaseEntity +{ + DECLARE_CLASS( CTeam, CBaseEntity ); +public: + CTeam( void ); + virtual ~CTeam( void ); + + DECLARE_SERVERCLASS(); + + virtual void Precache( void ) { return; }; + + virtual void Think( void ); + virtual int UpdateTransmitState( void ); + + //----------------------------------------------------------------------------- + // Initialization + //----------------------------------------------------------------------------- + virtual void Init( const char *pName, int iNumber ); + + //----------------------------------------------------------------------------- + // Data Handling + //----------------------------------------------------------------------------- + virtual int GetTeamNumber( void ) const; + virtual const char *GetName( void ); + virtual void UpdateClientData( CBasePlayer *pPlayer ); + virtual bool ShouldTransmitToPlayer( CBasePlayer* pRecipient, CBaseEntity* pEntity ); + + //----------------------------------------------------------------------------- + // Spawnpoints + //----------------------------------------------------------------------------- + virtual void InitializeSpawnpoints( void ); + virtual void AddSpawnpoint( CTeamSpawnPoint *pSpawnpoint ); + virtual void RemoveSpawnpoint( CTeamSpawnPoint *pSpawnpoint ); + virtual CBaseEntity *SpawnPlayer( CBasePlayer *pPlayer ); + + //----------------------------------------------------------------------------- + // Players + //----------------------------------------------------------------------------- + virtual void InitializePlayers( void ); + virtual void AddPlayer( CBasePlayer *pPlayer ); + virtual void RemovePlayer( CBasePlayer *pPlayer ); + virtual int GetNumPlayers( void ); + virtual CBasePlayer *GetPlayer( int iIndex ); + + //----------------------------------------------------------------------------- + // Scoring + //----------------------------------------------------------------------------- + virtual void AddScore( int iScore ); + virtual void SetScore( int iScore ); + virtual int GetScore( void ); + virtual void ResetScores( void ); + + // Round scoring + virtual int GetRoundsWon( void ) { return m_iRoundsWon; } + virtual void SetRoundsWon( int iRounds ) { m_iRoundsWon = iRounds; } + virtual void IncrementRoundsWon( void ) { m_iRoundsWon++; } + + void AwardAchievement( int iAchievement ); + + virtual int GetAliveMembers( void ); + +public: + CUtlVector< CTeamSpawnPoint * > m_aSpawnPoints; + CUtlVector< CBasePlayer * > m_aPlayers; + + // Data + CNetworkString( m_szTeamname, MAX_TEAM_NAME_LENGTH ); + CNetworkVar( int, m_iScore ); + CNetworkVar( int, m_iRoundsWon ); + int m_iDeaths; + + // Spawnpoints + int m_iLastSpawn; // Index of the last spawnpoint used + + CNetworkVar( int, m_iTeamNum ); // Which team is this? +}; + +extern CUtlVector< CTeam * > g_Teams; +extern CTeam *GetGlobalTeam( int iIndex ); +extern int GetNumberOfTeams( void ); + +#endif // TEAM_H |