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.

436 lines
13 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "tfc_shareddefs.h"
  8. const char *g_AmmoTypeNames[] =
  9. {
  10. "DUMMY AMMO",
  11. TFC_AMMO_SHELLS_NAME,
  12. TFC_AMMO_NAILS_NAME,
  13. TFC_AMMO_ROCKETS_NAME,
  14. TFC_AMMO_CELLS_NAME,
  15. TFC_AMMO_MEDIKIT_NAME,
  16. TFC_AMMO_DETPACK_NAME,
  17. TFC_AMMO_GRENADES1_NAME,
  18. TFC_AMMO_GRENADES2_NAME
  19. };
  20. int g_nMaxGrenades[NUM_GRENADE_TYPES] =
  21. {
  22. 0, // GR_TYPE_NONE
  23. 4, // GR_TYPE_NORMAL
  24. 3, // GR_TYPE_CONCUSSION
  25. 2, // GR_TYPE_NAIL
  26. 2, // GR_TYPE_MIRV
  27. 2, // GR_TYPE_NAPALM
  28. 2, // GR_TYPE_GAS
  29. 4, // GR_TYPE_EMP
  30. 3, // GR_TYPE_CALTROP
  31. };
  32. CTFCPlayerClassInfo g_TFCPlayerClassInfo[PC_LASTCLASS];
  33. // Note: this could go in a script, but it's not much trouble to have it all here.
  34. class CClassInfoInitializer
  35. {
  36. public:
  37. CClassInfoInitializer()
  38. {
  39. memset( &g_TFCPlayerClassInfo, 0xFE, sizeof( g_TFCPlayerClassInfo ) );
  40. // PC_UNDEFINED.
  41. CTFCPlayerClassInfo *pInfo = &g_TFCPlayerClassInfo[PC_UNDEFINED];
  42. pInfo->m_pClassName = "undefined";
  43. pInfo->m_pModelName = "models/player/civilian.mdl";
  44. pInfo->m_flMaxSpeed = 1;
  45. memset( pInfo->m_MaxAmmo, 0, sizeof( pInfo->m_MaxAmmo ) );
  46. // PC_SCOUT.
  47. pInfo = &g_TFCPlayerClassInfo[PC_SCOUT];
  48. pInfo->m_pClassName = "scout";
  49. pInfo->m_pModelName = "models/player/scout.mdl";
  50. pInfo->m_flMaxSpeed = 400;
  51. pInfo->m_iMaxHealth = 75;
  52. pInfo->m_iInitArmor = 25;
  53. pInfo->m_iMaxArmor = 50;
  54. pInfo->m_flInitArmorType = 0.3;
  55. pInfo->m_flMaxArmorType = 0.3;
  56. pInfo->m_nArmorClasses = 3;
  57. pInfo->m_iInitArmorClass = 0;
  58. pInfo->m_iGrenadeType1 = GR_TYPE_CALTROP;
  59. pInfo->m_iGrenadeType2 = GR_TYPE_CONCUSSION;
  60. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 25;
  61. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 100;
  62. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  63. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 50;
  64. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  65. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  66. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  67. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 3;
  68. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 50;
  69. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 200;
  70. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 25;
  71. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 100;
  72. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  73. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  74. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  75. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  76. // PC_SNIPER.
  77. pInfo = &g_TFCPlayerClassInfo[PC_SNIPER];
  78. pInfo->m_pClassName = "sniper";
  79. pInfo->m_pModelName = "models/player/sniper.mdl";
  80. pInfo->m_flMaxSpeed = 300;
  81. pInfo->m_iMaxHealth = 90;
  82. pInfo->m_iInitArmor = 25;
  83. pInfo->m_iMaxArmor = 50;
  84. pInfo->m_flInitArmorType = 0.3;
  85. pInfo->m_flMaxArmorType = 0.3;
  86. pInfo->m_nArmorClasses = 3;
  87. pInfo->m_iInitArmorClass = 0;
  88. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  89. pInfo->m_iGrenadeType2 = GR_TYPE_NONE;
  90. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 60;
  91. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 50;
  92. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  93. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 0;
  94. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  95. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  96. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  97. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 0;
  98. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 75;
  99. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 100;
  100. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 25;
  101. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 50;
  102. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  103. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  104. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  105. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  106. // PC_SOLDIER.
  107. pInfo = &g_TFCPlayerClassInfo[PC_SOLDIER];
  108. pInfo->m_pClassName = "soldier";
  109. pInfo->m_pModelName = "models/player/soldier.mdl";
  110. pInfo->m_flMaxSpeed = 240;
  111. pInfo->m_iMaxHealth = 100;
  112. pInfo->m_iInitArmor = 100;
  113. pInfo->m_iMaxArmor = 200;
  114. pInfo->m_flInitArmorType = 0.8;
  115. pInfo->m_flMaxArmorType = 0.8;
  116. pInfo->m_nArmorClasses = 31;
  117. pInfo->m_iInitArmorClass = 0;
  118. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  119. pInfo->m_iGrenadeType2 = GR_TYPE_NAIL;
  120. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 50;
  121. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 0;
  122. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 10;
  123. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 0;
  124. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  125. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  126. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  127. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 1;
  128. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 100;
  129. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 100;
  130. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 50;
  131. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 50;
  132. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  133. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  134. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  135. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  136. // PC_DEMOMAN.
  137. pInfo = &g_TFCPlayerClassInfo[PC_DEMOMAN];
  138. pInfo->m_pClassName = "demoman";
  139. pInfo->m_pModelName = "models/player/demo.mdl";
  140. pInfo->m_flMaxSpeed = 280;
  141. pInfo->m_iMaxHealth = 90;
  142. pInfo->m_iInitArmor = 50;
  143. pInfo->m_iMaxArmor = 120;
  144. pInfo->m_flInitArmorType = 0.6;
  145. pInfo->m_flMaxArmorType = 0.6;
  146. pInfo->m_nArmorClasses = 31;
  147. pInfo->m_iInitArmorClass = 0;
  148. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  149. pInfo->m_iGrenadeType2 = GR_TYPE_MIRV;
  150. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 30;
  151. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 0;
  152. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 20;
  153. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 0;
  154. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  155. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  156. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  157. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 2;
  158. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 75;
  159. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 50;
  160. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 50;
  161. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 50;
  162. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  163. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  164. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  165. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  166. // PC_MEDIC.
  167. pInfo = &g_TFCPlayerClassInfo[PC_MEDIC];
  168. pInfo->m_pClassName = "medic";
  169. pInfo->m_pModelName = "models/player/medic.mdl";
  170. pInfo->m_flMaxSpeed = 320;
  171. pInfo->m_iMaxHealth = 90;
  172. pInfo->m_iInitArmor = 50;
  173. pInfo->m_iMaxArmor = 100;
  174. pInfo->m_flInitArmorType = 0.3;
  175. pInfo->m_flMaxArmorType = 0.6;
  176. pInfo->m_nArmorClasses = 11;
  177. pInfo->m_iInitArmorClass = 0;
  178. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  179. pInfo->m_iGrenadeType2 = GR_TYPE_CONCUSSION;
  180. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 50;
  181. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 50;
  182. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  183. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 0;
  184. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 50;
  185. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  186. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  187. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 2;
  188. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 75;
  189. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 150;
  190. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 25;
  191. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 50;
  192. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 50;
  193. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  194. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  195. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  196. // PC_HWGUY.
  197. pInfo = &g_TFCPlayerClassInfo[PC_HWGUY];
  198. pInfo->m_pClassName = "hwguy";
  199. pInfo->m_pModelName = "models/player/hvyweapon.mdl";
  200. pInfo->m_flMaxSpeed = 230;
  201. pInfo->m_iMaxHealth = 100;
  202. pInfo->m_iInitArmor = 150;
  203. pInfo->m_iMaxArmor = 300;
  204. pInfo->m_flInitArmorType = 0.8;
  205. pInfo->m_flMaxArmorType = 0.8;
  206. pInfo->m_nArmorClasses = 31;
  207. pInfo->m_iInitArmorClass = 0;
  208. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  209. pInfo->m_iGrenadeType2 = GR_TYPE_MIRV;
  210. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 200;
  211. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 0;
  212. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  213. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 30;
  214. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  215. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  216. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  217. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 1;
  218. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 200;
  219. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 200;
  220. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 25;
  221. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 50;
  222. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  223. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  224. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  225. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  226. // PC_PYRO.
  227. pInfo = &g_TFCPlayerClassInfo[PC_PYRO];
  228. pInfo->m_pClassName = "pyro";
  229. pInfo->m_pModelName = "models/player/pyro.mdl";
  230. pInfo->m_flMaxSpeed = 300;
  231. pInfo->m_iMaxHealth = 100;
  232. pInfo->m_iInitArmor = 50;
  233. pInfo->m_iMaxArmor = 150;
  234. pInfo->m_flInitArmorType = 0.6;
  235. pInfo->m_flMaxArmorType = 0.6;
  236. pInfo->m_nArmorClasses = 27;
  237. pInfo->m_iInitArmorClass = 0;
  238. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  239. pInfo->m_iGrenadeType2 = GR_TYPE_NAPALM;
  240. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 20;
  241. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 0;
  242. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 5;
  243. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 120;
  244. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  245. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  246. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  247. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 4;
  248. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 40;
  249. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 50;
  250. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 20;
  251. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 200;
  252. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  253. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  254. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  255. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  256. // PC_SPY.
  257. pInfo = &g_TFCPlayerClassInfo[PC_SPY];
  258. pInfo->m_pClassName = "spy";
  259. pInfo->m_pModelName = "models/player/spy.mdl";
  260. pInfo->m_flMaxSpeed = 300;
  261. pInfo->m_iMaxHealth = 90;
  262. pInfo->m_iInitArmor = 25;
  263. pInfo->m_iMaxArmor = 100;
  264. pInfo->m_flInitArmorType = 0.6;
  265. pInfo->m_flMaxArmorType = 0.6;
  266. pInfo->m_nArmorClasses = 27;
  267. pInfo->m_iInitArmorClass = 0;
  268. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  269. pInfo->m_iGrenadeType2 = GR_TYPE_GAS;
  270. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 40;
  271. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 50;
  272. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  273. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 10;
  274. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  275. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  276. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  277. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 2;
  278. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 40;
  279. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 100;
  280. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 15;
  281. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 30;
  282. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  283. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  284. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  285. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  286. // PC_ENGINEER.
  287. pInfo = &g_TFCPlayerClassInfo[PC_ENGINEER];
  288. pInfo->m_pClassName = "engineer";
  289. pInfo->m_pModelName = "models/player/engineer.mdl";
  290. pInfo->m_flMaxSpeed = 300;
  291. pInfo->m_iMaxHealth = 80;
  292. pInfo->m_iInitArmor = 25;
  293. pInfo->m_iMaxArmor = 50;
  294. pInfo->m_flInitArmorType = 0.3;
  295. pInfo->m_flMaxArmorType = 0.6;
  296. pInfo->m_nArmorClasses = 31;
  297. pInfo->m_iInitArmorClass = 0;
  298. pInfo->m_iGrenadeType1 = GR_TYPE_NORMAL;
  299. pInfo->m_iGrenadeType2 = GR_TYPE_EMP;
  300. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 20;
  301. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 25;
  302. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  303. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 100;
  304. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  305. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  306. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 2;
  307. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 2;
  308. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 50;
  309. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 50;
  310. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 30;
  311. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 200;
  312. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  313. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  314. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  315. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  316. // PC_CIVILIAN.
  317. pInfo = &g_TFCPlayerClassInfo[PC_CIVILIAN];
  318. pInfo->m_pClassName = "civilian";
  319. pInfo->m_pModelName = "models/player/civilian.mdl";
  320. pInfo->m_flMaxSpeed = 240;
  321. pInfo->m_iMaxHealth = 50;
  322. pInfo->m_iInitArmor = 0;
  323. pInfo->m_iMaxArmor = 0;
  324. pInfo->m_flInitArmorType = 0;
  325. pInfo->m_flMaxArmorType = 0;
  326. pInfo->m_nArmorClasses = 0;
  327. pInfo->m_iInitArmorClass = 0;
  328. pInfo->m_iGrenadeType1 = GR_TYPE_NONE;
  329. pInfo->m_iGrenadeType2 = GR_TYPE_NONE;
  330. pInfo->m_InitAmmo[TFC_AMMO_SHELLS] = 0;
  331. pInfo->m_InitAmmo[TFC_AMMO_NAILS] = 0;
  332. pInfo->m_InitAmmo[TFC_AMMO_ROCKETS] = 0;
  333. pInfo->m_InitAmmo[TFC_AMMO_CELLS] = 0;
  334. pInfo->m_InitAmmo[TFC_AMMO_MEDIKIT] = 0;
  335. pInfo->m_InitAmmo[TFC_AMMO_DETPACK] = 0;
  336. pInfo->m_InitAmmo[TFC_AMMO_GRENADES1] = 0;
  337. pInfo->m_InitAmmo[TFC_AMMO_GRENADES2] = 0;
  338. pInfo->m_MaxAmmo[TFC_AMMO_SHELLS] = 0;
  339. pInfo->m_MaxAmmo[TFC_AMMO_NAILS] = 0;
  340. pInfo->m_MaxAmmo[TFC_AMMO_ROCKETS] = 0;
  341. pInfo->m_MaxAmmo[TFC_AMMO_CELLS] = 0;
  342. pInfo->m_MaxAmmo[TFC_AMMO_MEDIKIT] = 0;
  343. pInfo->m_MaxAmmo[TFC_AMMO_DETPACK] = 0;
  344. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES1] = 4;
  345. pInfo->m_MaxAmmo[TFC_AMMO_GRENADES2] = 4;
  346. }
  347. } g_ClassInfoInitializer;
  348. const CTFCPlayerClassInfo* GetTFCClassInfo( int iClass )
  349. {
  350. Assert( iClass >= 0 && iClass < PC_LASTCLASS );
  351. return &g_TFCPlayerClassInfo[iClass];
  352. }