diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/fx_shelleject.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/fx_shelleject.cpp')
| -rw-r--r-- | game/client/fx_shelleject.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/game/client/fx_shelleject.cpp b/game/client/fx_shelleject.cpp new file mode 100644 index 0000000..98380a5 --- /dev/null +++ b/game/client/fx_shelleject.cpp @@ -0,0 +1,59 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// +#include "cbase.h" +#include "fx.h" +#include "c_te_effect_dispatch.h" +#include "c_te_legacytempents.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void ShellEjectCallback( const CEffectData &data ) +{ + // Use the gun angles to orient the shell + IClientRenderable *pRenderable = data.GetRenderable(); + if ( pRenderable ) + { + tempents->EjectBrass( data.m_vOrigin, data.m_vAngles, pRenderable->GetRenderAngles(), 0 ); + } +} + +DECLARE_CLIENT_EFFECT( "ShellEject", ShellEjectCallback ); + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void RifleShellEjectCallback( const CEffectData &data ) +{ + // Use the gun angles to orient the shell + IClientRenderable *pRenderable = data.GetRenderable(); + if ( pRenderable ) + { + tempents->EjectBrass( data.m_vOrigin, data.m_vAngles, pRenderable->GetRenderAngles(), 1 ); + } +} + +DECLARE_CLIENT_EFFECT( "RifleShellEject", RifleShellEjectCallback ); + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void ShotgunShellEjectCallback( const CEffectData &data ) +{ + // Use the gun angles to orient the shell + IClientRenderable *pRenderable = data.GetRenderable(); + if ( pRenderable ) + { + tempents->EjectBrass( data.m_vOrigin, data.m_vAngles, pRenderable->GetRenderAngles(), 2 ); + } +} + +DECLARE_CLIENT_EFFECT( "ShotgunShellEject", ShotgunShellEjectCallback ); + + |