summaryrefslogtreecommitdiff
path: root/game/server/dod/dod_gamestats.cpp
blob: e692e04ff3083dcf2274ef97954b76247220b959 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: dod game stats
//
// $NoKeywords: $
//=============================================================================//

// Some tricky business here - we don't want to include the precompiled header for the statreader
// and trying to #ifdef it out does funky things like ignoring the #endif. Define our header file
// separately and include it based on the switch

#include "cbase.h"

#ifdef GAME_DLL
	#include "weapon_dodbase.h"
#endif

#include <tier0/platform.h>
#include "dod_gamestats.h"

int iDistanceStatWeapons[DOD_NUM_DISTANCE_STAT_WEAPONS] = 
{
	WEAPON_COLT,
	WEAPON_P38,
	WEAPON_C96,
	WEAPON_GARAND,
	WEAPON_GARAND_ZOOMED,
	WEAPON_M1CARBINE,
	WEAPON_K98,
	WEAPON_K98_ZOOMED,
	WEAPON_SPRING,
	WEAPON_SPRING_ZOOMED,
	WEAPON_K98_SCOPED,
	WEAPON_K98_SCOPED_ZOOMED,
	WEAPON_THOMPSON,
	WEAPON_MP40,
	WEAPON_MP44,
	WEAPON_MP44_SEMIAUTO,
	WEAPON_BAR,
	WEAPON_BAR_SEMIAUTO,
	WEAPON_30CAL,
	WEAPON_30CAL_UNDEPLOYED,
	WEAPON_MG42,
	WEAPON_MG42_UNDEPLOYED,
};

// Send hit/shots only for the following weapons
int iNoDistStatWeapons[DOD_NUM_NODIST_STAT_WEAPONS] =
{
	WEAPON_AMERKNIFE,
	WEAPON_SPADE,
	WEAPON_BAZOOKA,
	WEAPON_PSCHRECK,
	WEAPON_FRAG_US,
	WEAPON_FRAG_GER,
	WEAPON_FRAG_US_LIVE,
	WEAPON_FRAG_GER_LIVE,
	WEAPON_RIFLEGREN_US,
	WEAPON_RIFLEGREN_GER,
	WEAPON_RIFLEGREN_US_LIVE,
	WEAPON_RIFLEGREN_GER_LIVE,
	WEAPON_THOMPSON_PUNCH,
	WEAPON_MP40_PUNCH,
};

int iWeaponBucketDistances[DOD_NUM_WEAPON_DISTANCE_BUCKETS-1] =
{
	50,
	150,
	300,
	450,
	700,
	1000,
	1300,
	1600,
	2000		
};

#ifndef GAME_DLL

	const char * s_WeaponAliasInfo[] = 
	{
		"none",	//	WEAPON_NONE = 0,

		//Melee
		"amerknife",	//WEAPON_AMERKNIFE,
		"spade",		//WEAPON_SPADE,

		//Pistols
		"colt",			//WEAPON_COLT,
		"p38",			//WEAPON_P38,
		"c96",			//WEAPON_C96

		//Rifles
		"garand",		//WEAPON_GARAND,
		"m1carbine",	//WEAPON_M1CARBINE,
		"k98",			//WEAPON_K98,

		//Sniper Rifles
		"spring",		//WEAPON_SPRING,
		"k98_scoped",	//WEAPON_K98_SCOPED,

		//SMG
		"thompson",		//WEAPON_THOMPSON,
		"mp40",			//WEAPON_MP40,
		"mp44",			//WEAPON_MP44,
		"bar",			//WEAPON_BAR,

		//Machine guns
		"30cal",		//WEAPON_30CAL,
		"mg42",			//WEAPON_MG42,

		//Rocket weapons
		"bazooka",		//WEAPON_BAZOOKA,
		"pschreck",		//WEAPON_PSCHRECK,

		//Grenades
		"frag_us",		//WEAPON_FRAG_US,
		"frag_ger",		//WEAPON_FRAG_GER,

		"frag_us_live",		//WEAPON_FRAG_US_LIVE
		"frag_ger_live",	//WEAPON_FRAG_GER_LIVE

		"smoke_us",			//WEAPON_SMOKE_US
		"smoke_ger",		//WEAPON_SMOKE_GER

		"riflegren_us",	//WEAPON_RIFLEGREN_US
		"riflegren_ger",	//WEAPON_RIFLEGREN_GER

		"riflegren_us_live",	//WEAPON_RIFLEGREN_US_LIVE
		"riflegren_ger_live",		//WEAPON_RIFLEGREN_GER_LIVE

		// not actually separate weapons, but defines used in stats recording
		"thompson_punch",		//WEAPON_THOMPSON_PUNCH
		"mp40_punch",			//WEAPON_MP40_PUNCH
		"garand_zoomed",		//WEAPON_GARAND_ZOOMED,	

		"k98_zoomed",			//WEAPON_K98_ZOOMED
		"spring_zoomed",		//WEAPON_SPRING_ZOOMED
		"k98_scoped_zoomed",	//WEAPON_K98_SCOPED_ZOOMED	

		"30cal_undeployed",		//WEAPON_30CAL_UNDEPLOYED,
		"mg42_undeployed",		//WEAPON_MG42_UNDEPLOYED,

		"bar_semiauto",			//WEAPON_BAR_SEMIAUTO,
		"mp44_semiauto",		//WEAPON_MP44_SEMIAUTO,

		0,		// end of list marker
	};
#endif