summaryrefslogtreecommitdiff
path: root/game/client/tf/c_tf_team.h
blob: 75c2d6365d3827aa8c6ab4623f1ad867142c4c1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Client side CTFTeam class
//
// $NoKeywords: $
//=============================================================================

#ifndef C_TF_TEAM_H
#define C_TF_TEAM_H
#ifdef _WIN32
#pragma once
#endif

#include "c_team.h"
#include "shareddefs.h"
#include "c_baseobject.h"

class C_BaseEntity;
class C_BaseObject;
class CBaseTechnology;
class C_TFPlayer;

//-----------------------------------------------------------------------------
// Purpose: TF's Team manager
//-----------------------------------------------------------------------------
class C_TFTeam : public C_Team
{
	DECLARE_CLASS( C_TFTeam, C_Team );
	DECLARE_CLIENTCLASS();

public:

					C_TFTeam();
	virtual			~C_TFTeam();

	int				GetFlagCaptures( void ) { return m_nFlagCaptures; }
	int				GetRole( void ) { return m_iRole; }
	char			*Get_Name( void );

	int				GetNumObjects( int iObjectType = -1 );
	CBaseObject		*GetObject( int num );

	CUtlVector< CHandle<C_BaseObject> > m_aObjects;

	C_BasePlayer	*GetTeamLeader( void );
	void			UpdateTeamName( void );
	const wchar_t *Get_Localized_Name( void ){ return m_wzTeamname; };

	virtual void OnDataChanged( DataUpdateType_t updateType ) OVERRIDE;

	bool IsUsingCustomTeamName( void ) { return m_bUsingCustomTeamName; }

	// IClientThinkable override
	virtual	void	ClientThink();

private:

	int		m_nFlagCaptures;
	int		m_iRole;

	CNetworkHandle( C_BasePlayer, m_hLeader );
	wchar_t	m_wzTeamname[ MAX_TEAM_NAME_LENGTH ];
	bool m_bUsingCustomTeamName;
};

C_TFTeam *GetGlobalTFTeam( int iTeamNumber );

#endif // C_TF_TEAM_H