summaryrefslogtreecommitdiff
path: root/game/server/tf2/tf_playerlocaldata.h
blob: 408f54d87a1cba92977dcaae7f659db9e9ff0121 (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: 
//
// $NoKeywords: $
//=============================================================================//

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

#include "techtree.h"
#include "predictable_entity.h"
#include "tf_obj.h"

//-----------------------------------------------------------------------------
// Purpose: Player specific data for TF2 ( sent only to local player, too )
//-----------------------------------------------------------------------------
class CTFPlayerLocalData
{
public:
	DECLARE_PREDICTABLE();
	DECLARE_CLASS_NOBASE( CTFPlayerLocalData );
	DECLARE_EMBEDDED_NETWORKVAR();

	CTFPlayerLocalData();
	
	CBaseTFPlayer	*m_pPlayer;

	CNetworkVar( bool, m_nInTacticalView );

	// Player has been knocked down
	CNetworkVar( bool, m_bKnockedDown );
	CNetworkQAngle( m_vecKnockDownDir );

	// Player is using thermal vision
	CNetworkVar( bool, m_bThermalVision );

	// ID
	CNetworkVar( int, m_iIDEntIndex );

	// Resource chunk carrying counts
	CNetworkArray( int, m_iResourceAmmo, RESOURCE_TYPES );	// 0 = Normal resources, 1 = Processed resources

	// Resource manipulation
	void		AddResources( int iAmount );
	void		RemoveResources( int iAmount );
	int			ResourceCount( void ) const;
	void		SetResources( int iAmount );

	// Resource bank
	CNetworkVar( int, m_iBankResources );					// Current amounts of resources in my bank

	// Objects
	CUtlVector< CHandle<CBaseObject> > m_aObjects;

	// Object sapper placement handling
	CNetworkVar( bool,	m_bAttachingSapper );
	CNetworkVar( float,	m_flSapperAttachmentFrac );

	CNetworkVar( bool, m_bForceMapOverview );
};

EXTERN_SEND_TABLE(DT_TFLocal);

#endif // TF_PLAYERLOCALDATA_H