summaryrefslogtreecommitdiff
path: root/game/server/dod/dod_statmgr.h
blob: 6c34cacd3ea3e2419d03febecc62912d9fe3bed8 (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
69
70
71
72
73
74
75
76
77
78
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

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

#include "GameEventListener.h"
#include <igamesystem.h>

// Structure that holds all information related to how a player related to a 
// 
typedef struct
{
	// shots taken
	int m_iNumShotsTaken;

	// shots hit
	int m_iNumShotsHit;

	// total damage given
	int m_iTotalDamageGiven;

	// average distance of hit shots
	float m_flAverageHitDistance;

	// total kills
	int m_iNumKills;

	// times we hit each hitgroup
	int m_iBodygroupsHit[7];

	// times hit by this weapon
	int m_iNumHitsTaken;

	// total damage given to us
	int m_iTotalDamageTaken;

	// times killed by this weapon
	int m_iTimesKilled;

	// times we were hit in each hitgroup
	int m_iHitInBodygroups[8];
} weaponstat_t;

// Can be used to represent a victim and how many times we killed him,
// or as an attacker, how many times we were killed by this person
typedef struct 
{
	char m_szPlayerName[MAX_PLAYER_NAME_LENGTH];	// when we add this player, store the player name
	int m_iUserID;		// player that did the killing
	int m_iKills;			// number of kills
	int m_iTotalDamage;	// amount of damage
} playerstat_t;

class CDODStatManager : public CGameEventListener, public CAutoGameSystem
{
private:
	typedef CBaseGameSystem BaseClass;

public:
	CDODStatManager();

public: // IGameEventListener Interface
	virtual void FireGameEvent( IGameEvent * event );

public: // CBaseGameSystem overrides
	virtual bool Init();	
	//virtual void Shutdown() {}
};


#endif // DOD_STATMGR_H