summaryrefslogtreecommitdiff
path: root/game/server/dod/dod_gamestats.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/dod/dod_gamestats.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/dod/dod_gamestats.cpp')
-rw-r--r--game/server/dod/dod_gamestats.cpp150
1 files changed, 150 insertions, 0 deletions
diff --git a/game/server/dod/dod_gamestats.cpp b/game/server/dod/dod_gamestats.cpp
new file mode 100644
index 0000000..e692e04
--- /dev/null
+++ b/game/server/dod/dod_gamestats.cpp
@@ -0,0 +1,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 \ No newline at end of file