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.

40 lines
1.1 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 SDK_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 SDK_FX_EjectBrass_9mm_Callback( const CEffectData &data )
  22. {
  23. SDK_EjectBrass( CS_SHELL_9MM, data );
  24. }
  25. void SDK_FX_EjectBrass_12Gauge_Callback( const CEffectData &data )
  26. {
  27. SDK_EjectBrass( CS_SHELL_12GAUGE, data );
  28. }
  29. DECLARE_CLIENT_EFFECT( "EjectBrass_9mm", SDK_FX_EjectBrass_9mm_Callback );
  30. DECLARE_CLIENT_EFFECT( "EjectBrass_12Gauge",SDK_FX_EjectBrass_12Gauge_Callback );