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.

691 lines
18 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef DOD_SHAREDDEFS_H
  7. #define DOD_SHAREDDEFS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "dod_playeranimstate.h"
  12. #define DOD_PLAYER_VIEW_OFFSET Vector( 0, 0, 54 )
  13. // DOD Team IDs.
  14. #define TEAM_ALLIES 2
  15. #define TEAM_AXIS 3
  16. #define TEAM_MAXCOUNT 4 // update this if we ever add teams (unlikely)
  17. enum SubTeam
  18. {
  19. SUBTEAM_NORMAL = 0,
  20. SUBTEAM_PARA,
  21. SUBTEAM_ALT_NATION,
  22. NUM_SUBTEAMS
  23. };
  24. #define MAX_CONTROL_POINTS 8
  25. #define MAX_CONTROL_POINT_GROUPS 8
  26. #define DEATH_CAM_TIME 5.0f
  27. #define MAX_WAVE_RESPAWN_TIME 20.0f
  28. #define DOD_BOMB_TIMER_LENGTH 20
  29. #define DOD_BOMB_DEFUSE_TIME 3.0f
  30. #define DOD_BOMB_PLANT_TIME 2.0f
  31. #define DOD_BOMB_PLANT_RADIUS 80
  32. #define DOD_BOMB_DEFUSE_MAXDIST 96.0f
  33. enum
  34. {
  35. CAP_EVENT_NONE,
  36. CAP_EVENT_BOMB,
  37. CAP_EVENT_FLAG,
  38. CAP_EVENT_TIMER_EXPIRE
  39. };
  40. enum
  41. {
  42. WINPANEL_TOP3_NONE,
  43. WINPANEL_TOP3_BOMBERS,
  44. WINPANEL_TOP3_CAPPERS,
  45. WINPANEL_TOP3_DEFENDERS,
  46. WINPANEL_TOP3_KILLERS
  47. };
  48. //--------------
  49. // DoD Specific damage flags
  50. //--------------
  51. // careful when reusing HL2 DMG_ flags, some of them cancel out the damage, eg if they are in DMG_TIMEBASED
  52. #define DMG_STUN (DMG_PARALYZE) //(1<<15)
  53. #define DMG_MACHINEGUN (DMG_LASTGENERICFLAG<<1) //(1<<30)
  54. #define DMG_BOMB (DMG_LASTGENERICFLAG<<2) //(1<<31)
  55. //END OF THE EXTENDABLE LIST!! Start reusing HL2 specific flags
  56. #define MELEE_DMG_SECONDARYATTACK (1<<0)
  57. #define MELEE_DMG_FIST (1<<1)
  58. #define MELEE_DMG_EDGE (1<<2)
  59. #define MELEE_DMG_STRONGATTACK (1<<3)
  60. #define SANDBAG_NOT_TOUCHING 0
  61. #define SANDBAG_TOUCHING 1
  62. #define SANDBAG_TOUCHING_ALIGNED 2
  63. #define SANDBAG_DEPLOYED 3
  64. #define PRONE_DEPLOY_HEIGHT -1
  65. #define STANDING_DEPLOY_HEIGHT 58
  66. #define CROUCHING_DEPLOY_HEIGHT 28
  67. #define TIME_TO_DEPLOY 0.3
  68. #define MIN_DEPLOY_PITCH 45
  69. #define MAX_DEPLOY_PITCH -60
  70. #define VEC_DUCK_MOVING_HULL_MIN Vector(-16, -16, 0 )
  71. #define VEC_DUCK_MOVING_HULL_MAX Vector( 16, 16, 55 )
  72. #define VEC_PRONE_HULL_MIN DODGameRules()->GetDODViewVectors()->m_vProneHullMin
  73. #define VEC_PRONE_HULL_MAX DODGameRules()->GetDODViewVectors()->m_vProneHullMax // MUST be shorter than duck hull for deploy check
  74. #define VEC_PRONE_HULL_MIN_SCALED( player ) ( DODGameRules()->GetDODViewVectors()->m_vProneHullMin * player->GetModelScale() )
  75. #define VEC_PRONE_HULL_MAX_SCALED( player ) ( DODGameRules()->GetDODViewVectors()->m_vProneHullMax * player->GetModelScale() )
  76. #define VEC_PRONE_HELPER_HULL_MIN Vector(-48, -48, 0 )
  77. #define VEC_PRONE_HELPER_HULL_MAX Vector( 48, 48, 24 )
  78. #define GRENADE_FUSE_LENGTH 5.0
  79. #define RIFLEGRENADE_FUSE_LENGTH 3.5
  80. #define CONTENTS_PRONE_HELPER 0x80000000
  81. #define PASS_OUT_CHANGE_TIME 1.5
  82. #define PASS_OUT_GET_UP_TIME 1.5
  83. // DOD-specific viewport panels
  84. #define PANEL_TEAM "team"
  85. #define PANEL_CLASS_ALLIES "class_us"
  86. #define PANEL_CLASS_AXIS "class_ger"
  87. #define PANEL_BACKGROUND "background"
  88. #define COLOR_DOD_GREEN Color(77, 121, 66, 255) // Color(76, 102, 76, 255)
  89. #define COLOR_DOD_RED Color(255, 64, 64, 255)
  90. #define DOD_HUD_HEALTH_IMAGE_LENGTH 64
  91. // The various states the player can be in during the join game process.
  92. enum DODPlayerState
  93. {
  94. // Happily running around in the game.
  95. // This state can jump to a bunch of other states like STATE_PICKINGCLASS or STATE_DEATH_ANIM.
  96. STATE_ACTIVE=0,
  97. // This is the state you're in when you first enter the server.
  98. // It's switching between intro cameras every few seconds, and there's a level info
  99. // screen up.
  100. STATE_WELCOME, // Show the level intro screen.
  101. // During these states, you can either be a new player waiting to join, or
  102. // you can be a live player in the game who wants to change teams.
  103. // Either way, you can't move while choosing team or class (or while any menu is up).
  104. STATE_PICKINGTEAM, // Choosing team.
  105. STATE_PICKINGCLASS, // Choosing class.
  106. STATE_DEATH_ANIM, // Playing death anim, waiting for that to finish.
  107. STATE_DEATH_OBSERVING, // Done playing death anim. Waiting for keypress to go into observer mode.
  108. STATE_OBSERVER_MODE, // Noclipping around, watching players, etc.
  109. NUM_PLAYER_STATES
  110. };
  111. enum DODRoundState
  112. {
  113. // initialize the game, create teams
  114. STATE_INIT=0,
  115. //Before players have joined the game. Periodically checks to see if enough players are ready
  116. //to start a game. Also reverts to this when there are no active players
  117. STATE_PREGAME,
  118. //The game is about to start, wait a bit and spawn everyone
  119. STATE_STARTGAME,
  120. //All players are respawned, frozen in place
  121. STATE_PREROUND,
  122. //Round is on, playing normally
  123. STATE_RND_RUNNING,
  124. //Someone has won the round
  125. STATE_ALLIES_WIN,
  126. STATE_AXIS_WIN,
  127. //Noone has won, manually restart the game, reset scores
  128. STATE_RESTART,
  129. //Game is over, showing the scoreboard etc
  130. STATE_GAME_OVER,
  131. NUM_ROUND_STATES
  132. };
  133. #define PLAYERCLASS_RANDOM -2
  134. #define PLAYERCLASS_UNDEFINED -1
  135. #define DOD_PLAYERMODEL_AXIS_RIFLEMAN "models/player/german_rifleman.mdl"
  136. #define DOD_PLAYERMODEL_AXIS_ASSAULT "models/player/german_assault.mdl"
  137. #define DOD_PLAYERMODEL_AXIS_SUPPORT "models/player/german_support.mdl"
  138. #define DOD_PLAYERMODEL_AXIS_SNIPER "models/player/german_sniper.mdl"
  139. #define DOD_PLAYERMODEL_AXIS_MG "models/player/german_mg.mdl"
  140. #define DOD_PLAYERMODEL_AXIS_ROCKET "models/player/german_rocket.mdl"
  141. #define DOD_PLAYERMODEL_US_RIFLEMAN "models/player/american_rifleman.mdl"
  142. #define DOD_PLAYERMODEL_US_ASSAULT "models/player/american_assault.mdl"
  143. #define DOD_PLAYERMODEL_US_SUPPORT "models/player/american_support.mdl"
  144. #define DOD_PLAYERMODEL_US_SNIPER "models/player/american_sniper.mdl"
  145. #define DOD_PLAYERMODEL_US_MG "models/player/american_mg.mdl"
  146. #define DOD_PLAYERMODEL_US_ROCKET "models/player/american_rocket.mdl"
  147. typedef struct DodClassInfo_s
  148. {
  149. char selectcmd[32];
  150. char classname[128];
  151. char modelname[128];
  152. int team; //which team. 0 == allies, 1 == axis
  153. int primarywpn;
  154. int secondarywpn;
  155. int meleewpn;
  156. int numgrenades;
  157. int armskin; //what skin does this class show in grenades / knives
  158. int headgroup; //bodygroups
  159. int helmetgroup;
  160. int geargroup;
  161. int bodygroup;
  162. int hairgroup; //what helmet group to switch to when the helmet comes off
  163. } DodClassInfo_t;
  164. extern DodClassInfo_t g_ClassInfo[]; //a structure to hold all of the classes
  165. extern DodClassInfo_t g_ParaClassInfo[];
  166. // Voice Commands
  167. typedef struct DodVoiceCommand_s
  168. {
  169. const char *pszCommandName; // console command that will produce the voice command
  170. const char *pszSoundName; // name of sound to play
  171. PlayerAnimEvent_t iHandSignal; //index into the hand signal array
  172. const char *pszAlliedSubtitle; // subtitles for each nationality
  173. const char *pszAxisSubtitle;
  174. const char *pszBritishSubtitle;
  175. } DodVoiceCommand_t;
  176. extern DodVoiceCommand_t g_VoiceCommands[];
  177. // Hand Signals
  178. typedef struct DodHandSignal_s
  179. {
  180. const char *pszCommandName; // console command that will produce the voice command
  181. PlayerAnimEvent_t iHandSignal; //index into the hand signal array
  182. const char *pszSubtitle; // subtitles for each nationality
  183. } DodHandSignal_t;
  184. extern DodHandSignal_t g_HandSignals[];
  185. #define ARM_SKIN_UNDEFINED 0
  186. enum
  187. {
  188. HEAD_GROUP_0 = 0,
  189. HEAD_GROUP_1,
  190. HEAD_GROUP_2,
  191. HEAD_GROUP_3,
  192. HEAD_GROUP_4,
  193. HEAD_GROUP_5,
  194. HEAD_GROUP_6,
  195. };
  196. enum
  197. {
  198. HELMET_GROUP_0 = 0,
  199. HELMET_GROUP_1,
  200. HELMET_GROUP_2,
  201. HELMET_GROUP_3,
  202. HELMET_GROUP_4,
  203. HELMET_GROUP_5,
  204. HELMET_GROUP_6,
  205. HELMET_GROUP_7,
  206. };
  207. enum
  208. {
  209. BODY_GROUP_0 = 0,
  210. BODY_GROUP_1,
  211. BODY_GROUP_2,
  212. BODY_GROUP_3,
  213. BODY_GROUP_4,
  214. BODY_GROUP_5,
  215. };
  216. enum
  217. {
  218. GEAR_GROUP_0 = 0,
  219. GEAR_GROUP_1,
  220. GEAR_GROUP_2,
  221. GEAR_GROUP_3,
  222. GEAR_GROUP_4,
  223. GEAR_GROUP_5,
  224. GEAR_GROUP_6,
  225. };
  226. enum
  227. {
  228. BODYGROUP_BODY = 0,
  229. BODYGROUP_HELMET,
  230. BODYGROUP_HEAD,
  231. BODYGROUP_GEAR,
  232. BODYGROUP_JUMPGEAR
  233. };
  234. enum
  235. {
  236. BODYGROUP_HEAD1 = 0,
  237. BODYGROUP_HEAD2,
  238. BODYGROUP_HEAD3,
  239. BODYGROUP_HEAD4,
  240. BODYGROUP_HEAD5,
  241. BODYGROUP_HEAD6,
  242. BODYGROUP_HEAD7
  243. };
  244. //helmet groups
  245. #define BODYGROUP_HELMET_ON 0
  246. #define BODYGROUP_ALLIES_HELMET_HELMET1 0
  247. #define BODYGROUP_ALLIES_HELMET_HELMET2 1
  248. #define BODYGROUP_ALLIES_HELMET_OFF 2
  249. #define BODYGROUP_AXIS_HAIR0 1
  250. #define BODYGROUP_AXIS_HAIR1 2
  251. #define BODYGROUP_AXIS_HAIR2 3
  252. #define BODYGROUP_AXIS_HAIR3 4
  253. #define BODYGROUP_AXIS_HAIR4 5
  254. #define BODYGROUP_AXIS_HAIR5 6
  255. #define BODYGROUP_AXIS_HAIR6 7
  256. //battle gear groups
  257. #define BODYGROUP_TOMMYGEAR 0
  258. #define BODYGROUP_SPRINGGEAR 1
  259. #define BODYGROUP_GARANDGEAR 2
  260. #define BODYGROUP_MGGEAR 3
  261. #define BODYGROUP_BARGEAR 4
  262. #define BODYGROUP_CARBGEAR 5
  263. #define BODYGROUP_GREASEGUNGEAR 6
  264. //jump gear
  265. #define BODYGROUP_JUMPGEAR_OFF 0
  266. #define BODYGROUP_JUMPGEAR_ON 1
  267. enum
  268. {
  269. HELMET_ALLIES = 0,
  270. HELMET_AXIS,
  271. NUM_HELMETS
  272. };
  273. extern const char *m_pszHelmetModels[NUM_HELMETS];
  274. //Materials
  275. /*
  276. #define CHAR_TEX_CONCRETE 'C' // texture types
  277. #define CHAR_TEX_METAL 'M'
  278. #define CHAR_TEX_DIRT 'D'
  279. #define CHAR_TEX_GRATE 'G'
  280. #define CHAR_TEX_TILE 'T'
  281. #define CHAR_TEX_WOOD 'W'
  282. #define CHAR_TEX_GLASS 'Y'
  283. #define CHAR_TEX_FLESH 'F'
  284. #define CHAR_TEX_WATER 'S'
  285. #define CHAR_TEX_ROCK 'R'
  286. #define CHAR_TEX_SAND 'A'
  287. #define CHAR_TEX_GRAVEL 'L'
  288. #define CHAR_TEX_STUCCO 'Z'
  289. #define CHAR_TEX_BRICK 'B'
  290. #define CHAR_TEX_SNOW 'N'
  291. #define CHAR_TEX_HEAVYMETAL 'H'
  292. #define CHAR_TEX_LEAVES 'E'
  293. #define CHAR_TEX_SKY 'K'
  294. #define CHAR_TEX_GRASS 'P'
  295. */
  296. #define WPN_SLOT_PRIMARY 0
  297. #define WPN_SLOT_SECONDARY 1
  298. #define WPN_SLOT_MELEE 2
  299. #define WPN_SLOT_GRENADES 3
  300. #define WPN_SLOT_BOMB 4
  301. #define SLEEVE_AXIS 0
  302. #define SLEEVE_ALLIES 1
  303. #define VM_BODYGROUP_GUN 0
  304. #define VM_BODYGROUP_SLEEVE 1
  305. #define PLAYER_SPEED_FROZEN 1
  306. #define PLAYER_SPEED_PRONE 50
  307. #define PLAYER_SPEED_PRONE_ZOOMED 30
  308. #define PLAYER_SPEED_PRONE_BAZOOKA_DEPLOYED 30
  309. #define PLAYER_SPEED_ZOOMED 42
  310. #define PLAYER_SPEED_BAZOOKA_DEPLOYED 50
  311. #define PLAYER_SPEED_NORMAL 600.0f
  312. #define PLAYER_SPEED_SLOWED 120
  313. #define PLAYER_SPEED_RUN 220
  314. #define PLAYER_SPEED_SPRINT 330
  315. #define PUSHAWAY_THINK_INTERVAL (1.0f / 20.0f)
  316. #define VEC_PRONE_VIEW Vector(0,0,10)
  317. #define VEC_PRONE_VIEW_SCALED( player ) ( Vector(0,0,10) * player->GetModelScale() )
  318. #define TIME_TO_PRONE 1.2f // should be 1.5!
  319. #define INITIAL_SPRINT_STAMINA_PENALTY 15
  320. #define LOW_STAMINA_THRESHOLD 35
  321. // changed to 80% of goldsrc values, gives the same end result
  322. #define ZOOM_SWAY_PRONE 0.1
  323. #define ZOOM_SWAY_DUCKING 0.2
  324. #define ZOOM_SWAY_STANDING 0.5
  325. #define ZOOM_SWAY_MOVING_PENALTY 0.4
  326. extern const char * s_WeaponAliasInfo[];
  327. enum
  328. {
  329. //Dod hint messages
  330. HINT_FRIEND_SEEN = 0, // #Hint_spotted_a_friend
  331. HINT_ENEMY_SEEN, // #Hint_spotted_an_enemy
  332. HINT_FRIEND_INJURED, // #Hint_try_not_to_injure_teammates
  333. HINT_FRIEND_KILLED, // #Hint_careful_around_teammates
  334. HINT_ENEMY_KILLED, // #Hint_killing_enemies_is_good
  335. HINT_IN_AREA_CAP, // #Hint_touched_area_capture
  336. HINT_FLAG_TOUCH, // #Hint_touched_control_point
  337. HINT_OBJECT_PICKUP, // #Hint_picked_up_object
  338. HINT_MG_FIRE_UNDEPLOYED, // #Hint_mgs_fire_better_deployed
  339. HINT_SANDBAG_AREA, // #Hint_sandbag_area_touch
  340. HINT_BAZOOKA_PICKUP, // #Hint_rocket_weapon_pickup
  341. HINT_AMMO_EXHAUSTED, // #Hint_out_of_ammo
  342. HINT_PRONE, // #Hint_prone
  343. HINT_LOW_STAMINA, // #Hint_low_stamina
  344. HINT_OBJECT_REQUIRED, // #Hint_area_requires_object
  345. HINT_PLAYER_KILLED_WAVETIME, // #Hint_player_killed_wavetime
  346. HINT_WEAPON_OVERHEAT, // #Hint_mg_overheat
  347. HINT_SHOULDER_WEAPON, // #game_shoulder_rpg
  348. HINT_PICK_UP_WEAPON, // #Hint_pick_up_weapon
  349. HINT_PICK_UP_GRENADE, // #Hint_pick_up_grenade
  350. HINT_DEATHCAM, // #Hint_death_cam
  351. HINT_CLASSMENU, // #Hint_class_menu
  352. HINT_USE_MELEE, // #Hint_use_2e_melee
  353. HINT_USE_ZOOM, // #Hint_use_zoom
  354. HINT_USE_IRON_SIGHTS, // #Hint_use_iron_sights
  355. HINT_USE_SEMI_AUTO, // #Hint_use_semi_auto
  356. HINT_USE_SPRINT, // #Hint_use_sprint
  357. HINT_USE_DEPLOY, // #Hint_use_deploy
  358. HINT_USE_PRIME, // #Hint_use_prime
  359. HINT_MG_DEPLOY_USAGE, // #Hint_mg_deploy_usage
  360. HINT_MG_DEPLOY_TO_RELOAD, // #Dod_mg_reload
  361. HINT_GARAND_RELOAD, // #Hint_garand_reload
  362. HINT_TURN_OFF_HINTS, // #Hint_turn_off_hints
  363. HINT_NEED_BOMB, // #Hint_need_bomb_to_plant
  364. HINT_BOMB_PLANTED, // #Hint_bomb_planted
  365. HINT_DEFUSE_BOMB, // #Hint_defuse_bomb
  366. HINT_BOMB_TARGET, // #Hint_bomb_target
  367. HINT_BOMB_PICKUP, // #Hint_bomb_pickup
  368. HINT_BOMB_DEFUSE_ONGROUND, // #Hint_bomb_defuse_onground
  369. HINT_BOMB_PLANT_MAP, // #Hint_bomb_plant_map
  370. HINT_BOMB_FIRST_SELECT, // #Hint_bomb_first_select
  371. NUM_HINTS
  372. };
  373. extern const char *g_pszHintMessages[];
  374. // HINT_xxx bits to clear when the round restarts
  375. #define HINT_MASK_SPAWN_CLEAR ( 1 << HINT_FRIEND_KILLED )
  376. // criteria for when a weapon model wants to use an alt model
  377. #define ALTWPN_CRITERIA_NONE 0
  378. #define ALTWPN_CRITERIA_FIRING (1 << 0)
  379. #define ALTWPN_CRITERIA_RELOADING (1 << 1)
  380. #define ALTWPN_CRITERIA_DEPLOYED (1 << 2)
  381. #define ALTWPN_CRITERIA_DEPLOYED_RELOAD (1 << 3)
  382. #define ALTWPN_CRITERIA_PRONE (1 << 4) // player is prone
  383. #define ALTWPN_CRITERIA_PRONE_DEPLOYED_RELOAD (1 << 5) // player should use special alt model when prone deployed reloading
  384. // eject brass shells
  385. #define EJECTBRASS_PISTOL 0
  386. #define EJECTBRASS_RIFLE 1
  387. #define EJECTBRASS_MG 2
  388. #define EJECTBRASS_MG_2 3 // ?
  389. #define EJECTBRASS_GARANDCLIP 4
  390. extern const char *pszTeamAlliesClasses[];
  391. extern const char *pszTeamAxisClasses[];
  392. enum
  393. {
  394. DOD_COLLISIONGROUP_SHELLS = LAST_SHARED_COLLISION_GROUP,
  395. DOD_COLLISIONGROUP_BLOCKERWALL,
  396. };
  397. enum
  398. {
  399. PROGRESS_BAR_BANDAGER = 0,
  400. PROGRESS_BAR_BANDAGEE,
  401. PROGRESS_BAR_CAP, // done by objective resource
  402. NUM_PROGRESS_BAR_TYPES
  403. };
  404. // used for the corner cut panels in the HUD
  405. enum
  406. {
  407. DOD_CORNERCUT_PANEL_BOTTOMRIGHT = 0,
  408. DOD_CORNERCUT_PANEL_BOTTOMLEFT,
  409. DOD_CORNERCUT_PANEL_TOPRIGHT,
  410. DOD_CORNERCUT_PANEL_TOPLEFT,
  411. };
  412. enum ViewAnimationType {
  413. VIEW_ANIM_LINEAR_Z_ONLY,
  414. VIEW_ANIM_SPLINE_Z_ONLY,
  415. VIEW_ANIM_EXPONENTIAL_Z_ONLY,
  416. };
  417. enum BombTargetState
  418. {
  419. // invisible, not active
  420. BOMB_TARGET_INACTIVE=0,
  421. // visible, accepts planting +use
  422. BOMB_TARGET_ACTIVE,
  423. // visible, accepts disarm +use, counts down to explosion
  424. // if disarmed, returns to BOMB_TARGET_ACTIVE
  425. // if explodes, returns to BOMB_TARGET_INACTIVE
  426. BOMB_TARGET_ARMED,
  427. NUM_BOMB_TARGET_STATES
  428. };
  429. extern const char *pszWinPanelCategoryHeaders[];
  430. enum
  431. {
  432. // Season 1
  433. ACHIEVEMENT_DOD_THROW_BACK_GREN = 0,
  434. ACHIEVEMENT_DOD_CONSECUTIVE_HEADSHOTS,
  435. ACHIEVEMENT_DOD_MG_POSITION_STREAK,
  436. ACHIEVEMENT_DOD_WIN_KNIFE_FIGHT,
  437. ACHIEVEMENT_DOD_PLAY_CUSTOM_MAPS,
  438. ACHIEVEMENT_DOD_KILLS_WITH_GRENADE,
  439. ACHIEVEMENT_DOD_LONG_RANGE_ROCKET,
  440. ACHIEVEMENT_DOD_END_ROUND_KILLS,
  441. ACHIEVEMENT_DOD_CAP_LAST_FLAG,
  442. ACHIEVEMENT_DOD_USE_ENEMY_WEAPONS,
  443. ACHIEVEMENT_DOD_KILL_DOMINATING_MG,
  444. ACHIEVEMENT_DOD_COLMAR_DEFENSE,
  445. ACHIEVEMENT_DOD_BLOCK_CAPTURES,
  446. ACHIEVEMENT_DOD_JAGD_OVERTIME_CAP,
  447. ACHIEVEMENT_DOD_WEAPON_MASTERY,
  448. // grinds
  449. ACHIEVEMENT_DOD_KILLS_AS_ALLIES,
  450. ACHIEVEMENT_DOD_KILLS_AS_AXIS,
  451. ACHIEVEMENT_DOD_KILLS_AS_RIFLEMAN,
  452. ACHIEVEMENT_DOD_KILLS_AS_ASSAULT,
  453. ACHIEVEMENT_DOD_KILLS_AS_SUPPORT,
  454. ACHIEVEMENT_DOD_KILLS_AS_SNIPER,
  455. ACHIEVEMENT_DOD_KILLS_AS_MG,
  456. ACHIEVEMENT_DOD_KILLS_AS_BAZOOKAGUY,
  457. ACHIEVEMENT_DOD_KILLS_WITH_GARAND,
  458. ACHIEVEMENT_DOD_KILLS_WITH_THOMPSON,
  459. ACHIEVEMENT_DOD_KILLS_WITH_BAR,
  460. ACHIEVEMENT_DOD_KILLS_WITH_SPRING,
  461. ACHIEVEMENT_DOD_KILLS_WITH_30CAL,
  462. ACHIEVEMENT_DOD_KILLS_WITH_BAZOOKA,
  463. ACHIEVEMENT_DOD_KILLS_WITH_K98,
  464. ACHIEVEMENT_DOD_KILLS_WITH_MP40,
  465. ACHIEVEMENT_DOD_KILLS_WITH_MP44,
  466. ACHIEVEMENT_DOD_KILLS_WITH_K98SCOPED,
  467. ACHIEVEMENT_DOD_KILLS_WITH_MG42,
  468. ACHIEVEMENT_DOD_KILLS_WITH_PSCHRECK,
  469. ACHIEVEMENT_DOD_KILLS_WITH_COLT,
  470. ACHIEVEMENT_DOD_KILLS_WITH_P38,
  471. ACHIEVEMENT_DOD_KILLS_WITH_C96,
  472. ACHIEVEMENT_DOD_KILLS_WITH_M1CARBINE,
  473. ACHIEVEMENT_DOD_KILLS_WITH_AMERKNIFE,
  474. ACHIEVEMENT_DOD_KILLS_WITH_SPADE,
  475. ACHIEVEMENT_DOD_KILLS_WITH_PUNCH,
  476. ACHIEVEMENT_DOD_KILLS_WITH_FRAG_US,
  477. ACHIEVEMENT_DOD_KILLS_WITH_FRAG_GER,
  478. ACHIEVEMENT_DOD_KILLS_WITH_RIFLEGREN_US,
  479. ACHIEVEMENT_DOD_KILLS_WITH_RIFLEGREN_GER,
  480. ACHIEVEMENT_DOD_CAPTURE_GRIND,
  481. ACHIEVEMENT_DOD_BLOCK_CAPTURES_GRIND,
  482. ACHIEVEMENT_DOD_ROUNDS_WON_GRIND,
  483. ACHIEVEMENT_DOD_BOMBS_PLANTED_GRIND,
  484. ACHIEVEMENT_DOD_BOMBS_DEFUSED_GRIND,
  485. ACHIEVEMENT_DOD_ALL_PACK_1,
  486. ACHIEVEMENT_DOD_BEAT_THE_HEAT,
  487. // Winter 2011
  488. ACHIEVEMENT_DOD_COLLECT_HOLIDAY_GIFTS,
  489. NUM_DOD_ACHIEVEMENTS
  490. };
  491. #define ACHIEVEMENT_NUM_CONSECUTIVE_HEADSHOTS 5
  492. #define ACHIEVEMENT_MG_STREAK_IS_DOMINATING 8
  493. #define ACHIEVEMENT_NUM_ENEMY_WPN_KILLS 5
  494. #define ACHIEVEMENT_LONG_RANGE_ROCKET_DIST 1200
  495. // other magic numbers exist inside the achievements themselves in achievements_dod.cpp
  496. enum
  497. {
  498. DOD_MUZZLEFLASH_PISTOL = 0,
  499. DOD_MUZZLEFLASH_AUTO,
  500. DOD_MUZZLEFLASH_RIFLE,
  501. DOD_MUZZLEFLASH_MG,
  502. DOD_MUZZLEFLASH_ROCKET,
  503. DOD_MUZZLEFLASH_MG42
  504. };
  505. #define DOD_KILLS_DOMINATION 4
  506. // Death notice flags
  507. #define DOD_DEATHFLAG_DOMINATION 0x0001 // killer is dominating victim
  508. #define DOD_DEATHFLAG_REVENGE 0x0002 // killer got revenge on victim
  509. enum
  510. {
  511. ACHIEVEMENT_AWARDS_NONE = 0,
  512. ACHIEVEMENT_AWARDS_RIFLEMAN,
  513. ACHIEVEMENT_AWARDS_ASSAULT,
  514. ACHIEVEMENT_AWARDS_SUPPORT,
  515. ACHIEVEMENT_AWARDS_SNIPER,
  516. ACHIEVEMENT_AWARDS_MG,
  517. ACHIEVEMENT_AWARDS_ROCKET,
  518. ACHIEVEMENT_AWARDS_ALL_PACK_1,
  519. NUM_ACHIEVEMENT_AWARDS
  520. };
  521. extern const char *g_pszAchievementAwards[NUM_ACHIEVEMENT_AWARDS];
  522. extern const char *g_pszAchievementAwardMaterials_Allies[NUM_ACHIEVEMENT_AWARDS];
  523. extern const char *g_pszAchievementAwardMaterials_Axis[NUM_ACHIEVEMENT_AWARDS];
  524. enum DODStatType_t
  525. {
  526. DODSTAT_PLAYTIME = 0,
  527. DODSTAT_ROUNDSWON,
  528. DODSTAT_ROUNDSLOST,
  529. DODSTAT_KILLS,
  530. DODSTAT_DEATHS,
  531. DODSTAT_CAPTURES,
  532. DODSTAT_BLOCKS,
  533. DODSTAT_BOMBSPLANTED,
  534. DODSTAT_BOMBSDEFUSED,
  535. DODSTAT_DOMINATIONS,
  536. DODSTAT_REVENGES,
  537. DODSTAT_SHOTS_HIT,
  538. DODSTAT_SHOTS_FIRED,
  539. DODSTAT_HEADSHOTS,
  540. DODSTAT_MAX
  541. };
  542. #define DODSTAT_FIRST DODSTAT_PLAYTIME
  543. typedef struct
  544. {
  545. int m_iStat[DODSTAT_MAX];
  546. bool m_bDirty[DODSTAT_MAX];
  547. } dod_stat_accumulator_t;
  548. #define NUM_DOD_PLAYERCLASSES 6
  549. #endif // DOD_SHAREDDEFS_H