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.

61 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Game-specific impact effect hooks
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "fx_impact.h"
  8. #include "tempent.h"
  9. #include "c_te_effect_dispatch.h"
  10. #include "c_te_legacytempents.h"
  11. //-----------------------------------------------------------------------------
  12. // Purpose: Handle weapon effect callbacks
  13. //-----------------------------------------------------------------------------
  14. void CStrike_EjectBrass( int shell, const CEffectData &data )
  15. {
  16. C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();
  17. if( !pPlayer )
  18. return;
  19. tempents->CSEjectBrass( data.m_vOrigin, data.m_vAngles, data.m_fFlags, shell, pPlayer );
  20. }
  21. void CStrike_FX_EjectBrass_9mm_Callback( const CEffectData &data )
  22. {
  23. CStrike_EjectBrass( CS_SHELL_9MM, data );
  24. }
  25. void CStrike_FX_EjectBrass_57_Callback( const CEffectData &data )
  26. {
  27. CStrike_EjectBrass( CS_SHELL_57, data );
  28. }
  29. void CStrike_FX_EjectBrass_12Gauge_Callback( const CEffectData &data )
  30. {
  31. CStrike_EjectBrass( CS_SHELL_12GAUGE, data );
  32. }
  33. void CStrike_FX_EjectBrass_556_Callback( const CEffectData &data )
  34. {
  35. CStrike_EjectBrass( CS_SHELL_556, data );
  36. }
  37. void CStrike_FX_EjectBrass_762Nato_Callback( const CEffectData &data )
  38. {
  39. CStrike_EjectBrass( CS_SHELL_762NATO, data );
  40. }
  41. void CStrike_FX_EjectBrass_338Mag_Callback( const CEffectData &data )
  42. {
  43. CStrike_EjectBrass( CS_SHELL_338MAG, data );
  44. }
  45. DECLARE_CLIENT_EFFECT( "EjectBrass_9mm", CStrike_FX_EjectBrass_9mm_Callback );
  46. DECLARE_CLIENT_EFFECT( "EjectBrass_12Gauge", CStrike_FX_EjectBrass_12Gauge_Callback );
  47. DECLARE_CLIENT_EFFECT( "EjectBrass_57", CStrike_FX_EjectBrass_57_Callback );
  48. DECLARE_CLIENT_EFFECT( "EjectBrass_556", CStrike_FX_EjectBrass_556_Callback );
  49. DECLARE_CLIENT_EFFECT( "EjectBrass_762Nato", CStrike_FX_EjectBrass_762Nato_Callback );
  50. DECLARE_CLIENT_EFFECT( "EjectBrass_338Mag", CStrike_FX_EjectBrass_338Mag_Callback );