Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
3.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: dod game stats
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. // Some tricky business here - we don't want to include the precompiled header for the statreader
  8. // and trying to #ifdef it out does funky things like ignoring the #endif. Define our header file
  9. // separately and include it based on the switch
  10. #include "cbase.h"
  11. #ifdef GAME_DLL
  12. #include "weapon_dodbase.h"
  13. #endif
  14. #include <tier0/platform.h>
  15. #include "dod_gamestats.h"
  16. int iDistanceStatWeapons[DOD_NUM_DISTANCE_STAT_WEAPONS] =
  17. {
  18. WEAPON_COLT,
  19. WEAPON_P38,
  20. WEAPON_C96,
  21. WEAPON_GARAND,
  22. WEAPON_GARAND_ZOOMED,
  23. WEAPON_M1CARBINE,
  24. WEAPON_K98,
  25. WEAPON_K98_ZOOMED,
  26. WEAPON_SPRING,
  27. WEAPON_SPRING_ZOOMED,
  28. WEAPON_K98_SCOPED,
  29. WEAPON_K98_SCOPED_ZOOMED,
  30. WEAPON_THOMPSON,
  31. WEAPON_MP40,
  32. WEAPON_MP44,
  33. WEAPON_MP44_SEMIAUTO,
  34. WEAPON_BAR,
  35. WEAPON_BAR_SEMIAUTO,
  36. WEAPON_30CAL,
  37. WEAPON_30CAL_UNDEPLOYED,
  38. WEAPON_MG42,
  39. WEAPON_MG42_UNDEPLOYED,
  40. };
  41. // Send hit/shots only for the following weapons
  42. int iNoDistStatWeapons[DOD_NUM_NODIST_STAT_WEAPONS] =
  43. {
  44. WEAPON_AMERKNIFE,
  45. WEAPON_SPADE,
  46. WEAPON_BAZOOKA,
  47. WEAPON_PSCHRECK,
  48. WEAPON_FRAG_US,
  49. WEAPON_FRAG_GER,
  50. WEAPON_FRAG_US_LIVE,
  51. WEAPON_FRAG_GER_LIVE,
  52. WEAPON_RIFLEGREN_US,
  53. WEAPON_RIFLEGREN_GER,
  54. WEAPON_RIFLEGREN_US_LIVE,
  55. WEAPON_RIFLEGREN_GER_LIVE,
  56. WEAPON_THOMPSON_PUNCH,
  57. WEAPON_MP40_PUNCH,
  58. };
  59. int iWeaponBucketDistances[DOD_NUM_WEAPON_DISTANCE_BUCKETS-1] =
  60. {
  61. 50,
  62. 150,
  63. 300,
  64. 450,
  65. 700,
  66. 1000,
  67. 1300,
  68. 1600,
  69. 2000
  70. };
  71. #ifndef GAME_DLL
  72. const char * s_WeaponAliasInfo[] =
  73. {
  74. "none", // WEAPON_NONE = 0,
  75. //Melee
  76. "amerknife", //WEAPON_AMERKNIFE,
  77. "spade", //WEAPON_SPADE,
  78. //Pistols
  79. "colt", //WEAPON_COLT,
  80. "p38", //WEAPON_P38,
  81. "c96", //WEAPON_C96
  82. //Rifles
  83. "garand", //WEAPON_GARAND,
  84. "m1carbine", //WEAPON_M1CARBINE,
  85. "k98", //WEAPON_K98,
  86. //Sniper Rifles
  87. "spring", //WEAPON_SPRING,
  88. "k98_scoped", //WEAPON_K98_SCOPED,
  89. //SMG
  90. "thompson", //WEAPON_THOMPSON,
  91. "mp40", //WEAPON_MP40,
  92. "mp44", //WEAPON_MP44,
  93. "bar", //WEAPON_BAR,
  94. //Machine guns
  95. "30cal", //WEAPON_30CAL,
  96. "mg42", //WEAPON_MG42,
  97. //Rocket weapons
  98. "bazooka", //WEAPON_BAZOOKA,
  99. "pschreck", //WEAPON_PSCHRECK,
  100. //Grenades
  101. "frag_us", //WEAPON_FRAG_US,
  102. "frag_ger", //WEAPON_FRAG_GER,
  103. "frag_us_live", //WEAPON_FRAG_US_LIVE
  104. "frag_ger_live", //WEAPON_FRAG_GER_LIVE
  105. "smoke_us", //WEAPON_SMOKE_US
  106. "smoke_ger", //WEAPON_SMOKE_GER
  107. "riflegren_us", //WEAPON_RIFLEGREN_US
  108. "riflegren_ger", //WEAPON_RIFLEGREN_GER
  109. "riflegren_us_live", //WEAPON_RIFLEGREN_US_LIVE
  110. "riflegren_ger_live", //WEAPON_RIFLEGREN_GER_LIVE
  111. // not actually separate weapons, but defines used in stats recording
  112. "thompson_punch", //WEAPON_THOMPSON_PUNCH
  113. "mp40_punch", //WEAPON_MP40_PUNCH
  114. "garand_zoomed", //WEAPON_GARAND_ZOOMED,
  115. "k98_zoomed", //WEAPON_K98_ZOOMED
  116. "spring_zoomed", //WEAPON_SPRING_ZOOMED
  117. "k98_scoped_zoomed", //WEAPON_K98_SCOPED_ZOOMED
  118. "30cal_undeployed", //WEAPON_30CAL_UNDEPLOYED,
  119. "mg42_undeployed", //WEAPON_MG42_UNDEPLOYED,
  120. "bar_semiauto", //WEAPON_BAR_SEMIAUTO,
  121. "mp44_semiauto", //WEAPON_MP44_SEMIAUTO,
  122. 0, // end of list marker
  123. };
  124. #endif