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.

164 lines
5.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef EVENTLIST_H
  8. #define EVENTLIST_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #define AE_TYPE_SERVER ( 1 << 0 )
  13. #define AE_TYPE_SCRIPTED ( 1 << 1 ) // see scriptevent.h
  14. #define AE_TYPE_SHARED ( 1 << 2 )
  15. #define AE_TYPE_WEAPON ( 1 << 3 )
  16. #define AE_TYPE_CLIENT ( 1 << 4 )
  17. #define AE_TYPE_FACEPOSER ( 1 << 5 )
  18. #define AE_TYPE_NEWEVENTSYSTEM ( 1 << 10 ) //Temporary flag.
  19. #define AE_NOT_AVAILABLE -1
  20. typedef enum
  21. {
  22. AE_INVALID = -1, // So we have something more succint to check for than '-1'
  23. AE_EMPTY,
  24. AE_NPC_LEFTFOOT, // #define NPC_EVENT_LEFTFOOT 2050
  25. AE_NPC_RIGHTFOOT, // #define NPC_EVENT_RIGHTFOOT 2051
  26. AE_NPC_BODYDROP_LIGHT, //#define NPC_EVENT_BODYDROP_LIGHT 2001
  27. AE_NPC_BODYDROP_HEAVY, //#define NPC_EVENT_BODYDROP_HEAVY 2002
  28. AE_NPC_SWISHSOUND, //#define NPC_EVENT_SWISHSOUND 2010
  29. AE_NPC_180TURN, //#define NPC_EVENT_180TURN 2020
  30. AE_NPC_ITEM_PICKUP, //#define NPC_EVENT_ITEM_PICKUP 2040
  31. AE_NPC_WEAPON_DROP, //#define NPC_EVENT_WEAPON_DROP 2041
  32. AE_NPC_WEAPON_SET_SEQUENCE_NAME, //#define NPC_EVENT_WEAPON_SET_SEQUENCE_NAME 2042
  33. AE_NPC_WEAPON_SET_SEQUENCE_NUMBER, //#define NPC_EVENT_WEAPON_SET_SEQUENCE_NUMBER 2043
  34. AE_NPC_WEAPON_SET_ACTIVITY, //#define NPC_EVENT_WEAPON_SET_ACTIVITY 2044
  35. AE_NPC_HOLSTER,
  36. AE_NPC_DRAW,
  37. AE_NPC_WEAPON_FIRE,
  38. AE_CL_PLAYSOUND, // #define CL_EVENT_SOUND 5004 // Emit a sound
  39. AE_SV_PLAYSOUND,
  40. AE_CL_STOPSOUND,
  41. AE_START_SCRIPTED_EFFECT,
  42. AE_STOP_SCRIPTED_EFFECT,
  43. AE_CLIENT_EFFECT_ATTACH,
  44. AE_MUZZLEFLASH, // Muzzle flash from weapons held by the player
  45. AE_NPC_MUZZLEFLASH, // Muzzle flash from weapons held by NPCs
  46. AE_THUMPER_THUMP, //Thumper Thump!
  47. AE_AMMOCRATE_PICKUP_AMMO, //Ammo crate pick up ammo!
  48. AE_NPC_RAGDOLL,
  49. AE_NPC_ADDGESTURE,
  50. AE_NPC_RESTARTGESTURE,
  51. AE_NPC_ATTACK_BROADCAST,
  52. AE_NPC_HURT_INTERACTION_PARTNER,
  53. AE_NPC_SET_INTERACTION_CANTDIE,
  54. AE_SV_DUSTTRAIL,
  55. AE_CL_CREATE_PARTICLE_EFFECT,
  56. AE_CL_STOP_PARTICLE_EFFECT,
  57. AE_CL_ADD_PARTICLE_EFFECT_CP,
  58. AE_CL_CREATE_PARTICLE_BRASS,
  59. AE_RAGDOLL,
  60. AE_CL_ENABLE_BODYGROUP,
  61. AE_CL_DISABLE_BODYGROUP,
  62. AE_CL_BODYGROUP_SET_VALUE,
  63. AE_CL_BODYGROUP_SET_VALUE_CMODEL_WPN,
  64. AE_CL_BODYGROUP_SET_TO_CLIP, // Updates the value of bodygroup 1 to the number of bullets in m_iClip1
  65. AE_CL_BODYGROUP_SET_TO_NEXTCLIP, // Updates the value of bodygroup 1 to the number of bullets that can be reloaded next
  66. AE_CL_HIDE_SILENCER,
  67. AE_CL_ATTACH_SILENCER_COMPLETE,
  68. AE_CL_SHOW_SILENCER,
  69. AE_CL_DETACH_SILENCER_COMPLETE,
  70. AE_CL_EJECT_MAG, // Create a physical magazine to drop in the world and hide the fake-animated one
  71. AE_CL_EJECT_MAG_UNHIDE, //Unhide the non-physical mag that AE_CL_EJECT_MAG hid
  72. AE_WPN_PRIMARYATTACK, // Used by weapons that want their primary attack to occur during an attack anim (i.e. grenade throwing)
  73. AE_WPN_INCREMENTAMMO,
  74. AE_WPN_HIDE, // Used to hide player weapons
  75. AE_WPN_UNHIDE, // Used to unhide player weapons
  76. AE_WPN_PLAYWPNSOUND, // Play a weapon sound from the weapon script file
  77. AE_WPN_COMPLETE_RELOAD, // the event that fires when a weapon has completed a gun reload visually according to the animation
  78. // Alien Swarm Infested shared events
  79. AE_ASW_FOOTSTEP, // asw, played as each foot steps down
  80. AE_MARINE_FOOTSTEP,
  81. AE_MARINE_RELOAD_SOUND_A, // anim event fired reloading sound
  82. AE_MARINE_RELOAD_SOUND_B, // anim event fired reloading sound
  83. AE_MARINE_RELOAD_SOUND_C, // anim event fired reloading sound
  84. AE_REMOVE_CLIENT_AIM, // asw, removes this entity from the client autoaim list
  85. AE_MELEE_DAMAGE,
  86. AE_MELEE_START_COLLISION_DAMAGE,
  87. AE_MELEE_STOP_COLLISION_DAMAGE,
  88. AE_SCREEN_SHAKE,
  89. AE_START_DETECTING_COMBO,
  90. AE_STOP_DETECTING_COMBO,
  91. AE_COMBO_TRANSITION,
  92. AE_ALLOW_MOVEMENT,
  93. AE_SKILL_EVENT, // marine skill event triggered (event options describes the skill)
  94. AE_TUG_INCAP,
  95. AE_CLIENT_EJECT_BRASS,
  96. AE_BEGIN_TAUNT_LOOP,
  97. AE_CL_SET_STATTRAK_GLOW,
  98. AE_WPN_CZ_DUMP_CURRENT_MAG,
  99. AE_WPN_CZ_UPDATE_BODYGROUP,
  100. AE_WPN_CLIP_TO_POSEPARAM,
  101. AE_WPN_NEXTCLIP_TO_POSEPARAM,
  102. AE_WPN_EMPTYSHOTS_TO_POSEPARAM,
  103. LAST_SHARED_ANIMEVENT,
  104. } Animevent;
  105. typedef struct evententry_s evententry_t;
  106. //=========================================================
  107. //=========================================================
  108. extern void EventList_Init( void );
  109. extern void EventList_Free( void );
  110. extern bool EventList_RegisterSharedEvent( const char *pszEventName, int iEventIndex, int iType = 0 );
  111. extern Animevent EventList_RegisterPrivateEvent( const char *pszEventName );
  112. extern int EventList_IndexForName( const char *pszEventName );
  113. extern const char *EventList_NameForIndex( int iEventIndex );
  114. Animevent EventList_RegisterPrivateEvent( const char *pszEventName );
  115. // This macro guarantees that the names of each event and the constant used to
  116. // reference it in the code are identical.
  117. #define REGISTER_SHARED_ANIMEVENT( _n, b ) EventList_RegisterSharedEvent(#_n, _n, b );
  118. #define REGISTER_PRIVATE_ANIMEVENT( _n ) _n = EventList_RegisterPrivateEvent( #_n );
  119. // Implemented in shared code
  120. extern void EventList_RegisterSharedEvents( void );
  121. extern int EventList_GetEventType( int eventIndex );
  122. #endif // EVENTLIST_H