Counter Strike : Global Offensive Source Code
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.

96 lines
4.3 KiB

  1. //====== Copyright � 1996-2007, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #include "cbase.h"
  7. #include "mp_shareddefs.h"
  8. // NOTE: This has to be the last file included!
  9. #include "tier0/memdbgon.h"
  10. const char *g_pszMPConcepts[] =
  11. {
  12. "TLK_FIREWEAPON", // MP_CONCEPT_FIREWEAPON
  13. "TLK_HURT", // MP_CONCEPT_HURT
  14. "TLK_PLAYER_EXPRESSION", // MP_CONCEPT_PLAYER_EXPRESSION
  15. "TLK_WINDMINIGUN", // MP_CONCEPT_WINDMINIGUN
  16. "TLK_FIREMINIGUN", // MP_CONCEPT_FIREMINIGUN
  17. "TLK_PLAYER_MEDIC", // MP_CONCEPT_PLAYER_MEDIC
  18. "TLK_DETONATED_OBJECT", // MP_CONCEPT_DETONATED_OBJECT
  19. "TLK_KILLED_PLAYER", // MP_CONCEPT_KILLED_PLAYER
  20. "TLK_KILLED_OBJECT", // MP_CONCEPT_KILLED_OBJECT
  21. "TLK_PLAYER_PAIN", // MP_CONCEPT_PLAYER_PAIN
  22. "TLK_PLAYER_ATTACKER_PAIN", // MP_CONCEPT_PLAYER_ATTACKER_PAIN
  23. "TLK_PLAYER_TAUNT", // MP_CONCEPT_PLAYER_TAUNT
  24. "TLK_PLAYER_HELP", // MP_CONCEPT_PLAYER_HELP
  25. "TLK_PLAYER_GO", // MP_CONCEPT_PLAYER_GO
  26. "TLK_PLAYER_MOVEUP", // MP_CONCEPT_PLAYER_MOVEUP
  27. "TLK_PLAYER_LEFT", // MP_CONCEPT_PLAYER_LEFT
  28. "TLK_PLAYER_RIGHT", // MP_CONCEPT_PLAYER_RIGHT
  29. "TLK_PLAYER_YES", // MP_CONCEPT_PLAYER_YES
  30. "TLK_PLAYER_NO", // MP_CONCEPT_PLAYER_NO
  31. "TLK_PLAYER_INCOMING", // MP_CONCEPT_PLAYER_INCOMING
  32. "TLK_PLAYER_CLOAKEDSPY", // MP_CONCEPT_PLAYER_CLOAKEDSPY
  33. "TLK_PLAYER_SENTRYAHEAD", // MP_CONCEPT_PLAYER_SENTRYAHEAD
  34. "TLK_PLAYER_TELEPORTERHERE", // MP_CONCEPT_PLAYER_TELEPORTERHERE
  35. "TLK_PLAYER_DISPENSERHERE", // MP_CONCEPT_PLAYER_DISPENSERHERE
  36. "TLK_PLAYER_SENTRYHERE", // MP_CONCEPT_PLAYER_SENTRYHERE
  37. "TLK_PLAYER_ACTIVATECHARGE", // MP_CONCEPT_PLAYER_ACTIVATECHARGE
  38. "TLK_PLAYER_CHARGEREADY", // MP_CONCEPT_PLAYER_CHARGEREADY
  39. "TLK_PLAYER_TAUNTS" , // MP_CONCEPT_PLAYER_TAUNTS
  40. "TLK_PLAYER_BATTLECRY", // MP_CONCEPT_PLAYER_BATTLECRY
  41. "TLK_PLAYER_CHEERS", // MP_CONCEPT_PLAYER_CHEERS
  42. "TLK_PLAYER_JEERS", // MP_CONCEPT_PLAYER_JEERS
  43. "TLK_PLAYER_POSITIVE", // MP_CONCEPT_PLAYER_POSITIVE
  44. "TLK_PLAYER_NEGATIVE", // MP_CONCEPT_PLAYER_NEGATIVE
  45. "TLK_PLAYER_NICESHOT", // MP_CONCEPT_PLAYER_NICESHOT
  46. "TLK_PLAYER_GOODJOB", // MP_CONCEPT_PLAYER_GOODJOB
  47. "TLK_MEDIC_STARTEDHEALING", // MP_CONCEPT_MEDIC_STARTEDHEALING
  48. "TLK_MEDIC_CHARGEREADY", // MP_CONCEPT_MEDIC_CHARGEREADY
  49. "TLK_MEDIC_STOPPEDHEALING", // MP_CONCEPT_MEDIC_STOPPEDHEALING
  50. "TLK_MEDIC_CHARGEDEPLOYED", // MP_CONCEPT_MEDIC_CHARGEDEPLOYED
  51. "TLK_FLAGPICKUP", // MP_CONCEPT_FLAGPICKUP
  52. "TLK_FLAGCAPTURED", // MP_CONCEPT_FLAGCAPTURED
  53. "TLK_ROUND_START", // MP_CONCEPT_ROUND_START
  54. "TLK_SUDDENDEATH_START", // MP_CONCEPT_SUDDENDEATH_START
  55. "TLK_ONFIRE", // MP_CONCEPT_ONFIRE
  56. "TLK_STALEMATE", // MP_CONCEPT_STALEMATE
  57. "TLK_BUILDING_OBJECT", // MP_CONCEPT_BUILDING_OBJECT
  58. "TLK_LOST_OBJECT", // MP_CONCEPT_LOST_OBJECT
  59. "TLK_SPY_SAPPER", // MP_CONCEPT_SPY_SAPPER
  60. "TLK_TELEPORTED", // MP_CONCEPT_TELEPORTED
  61. "TLK_LOST_CONTROL_POINT", // MP_CONCEPT_LOST_CONTROL_POINT
  62. "TLK_CAPTURED_POINT", // MP_CONCEPT_CAPTURED_POINT
  63. "TLK_CAPTURE_BLOCKED", // MP_CONCEPT_CAPTURE_BLOCKED
  64. "TLK_HEALTARGET_STARTEDHEALING",// MP_CONCEPT_HEALTARGET_STARTEDHEALING
  65. "TLK_HEALTARGET_CHARGEREADY", // MP_CONCEPT_HEALTARGET_CHARGEREADY
  66. "TLK_HEALTARGET_STOPPEDHEALING",// MP_CONCEPT_HEALTARGET_STOPPEDHEALING
  67. "TLK_HEALTARGET_CHARGEDEPLOYED",// MP_CONCEPT_HEALTARGET_CHARGEDEPLOYED
  68. "TLK_MINIGUN_FIREWEAPON", // MP_CONCEPT_MINIGUN_FIREWEAPON
  69. "TLK_DIED", // MP_CONCEPT_DIED
  70. "TLK_PLAYER_THANKS", // MP_CONCEPT_PLAYER_THANKS
  71. "TLK_CART_MOVING_FORWARD", // MP_CONCEPT_CART_MOVING_FORWARD
  72. "TLK_CART_MOVING_BACKWARD", // MP_CONCEPT_CART_MOVING_BACKWARD
  73. "TLK_CART_STOP", // MP_CONCEPT_CART_STOP
  74. "TLK_ATE_FOOD", // MP_CONCEPT_ATE_FOOD
  75. };
  76. //-----------------------------------------------------------------------------
  77. // Purpose:
  78. //-----------------------------------------------------------------------------
  79. int GetMPConceptIndexFromString( const char *pszConcept )
  80. {
  81. // Make sure our concept string and enum arrays are the same length
  82. Assert( ARRAYSIZE( g_pszMPConcepts ) == MP_TF_CONCEPT_COUNT );
  83. for ( int iConcept = 0; iConcept < ARRAYSIZE( g_pszMPConcepts ); ++iConcept )
  84. {
  85. if ( !Q_stricmp( pszConcept, g_pszMPConcepts[iConcept] ) )
  86. return iConcept;
  87. }
  88. return MP_CONCEPT_NONE;
  89. }