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/tf/c_tf_fx.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/tf/c_tf_fx.cpp')
| -rw-r--r-- | game/client/tf/c_tf_fx.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/game/client/tf/c_tf_fx.cpp b/game/client/tf/c_tf_fx.cpp new file mode 100644 index 0000000..33ea1fc --- /dev/null +++ b/game/client/tf/c_tf_fx.cpp @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#include "cbase.h" +#include "tf_fx_shared.h" +#include "c_basetempentity.h" +#include "tier0/vprof.h" +#include <cliententitylist.h> + +class C_TEFireBullets : public C_BaseTempEntity +{ +public: + + DECLARE_CLASS( C_TEFireBullets, C_BaseTempEntity ); + DECLARE_CLIENTCLASS(); + + virtual void PostDataUpdate( DataUpdateType_t updateType ); + +public: + + int m_iPlayer; + Vector m_vecOrigin; + QAngle m_vecAngles; + int m_iWeaponID; + int m_iMode; + int m_iSeed; + float m_flSpread; + bool m_bCritical; +}; + +IMPLEMENT_CLIENTCLASS_EVENT( C_TEFireBullets, DT_TEFireBullets, CTEFireBullets ); + +BEGIN_RECV_TABLE_NOBASE( C_TEFireBullets, DT_TEFireBullets ) +RecvPropVector( RECVINFO( m_vecOrigin ) ), +RecvPropFloat( RECVINFO( m_vecAngles[0] ) ), +RecvPropFloat( RECVINFO( m_vecAngles[1] ) ), +RecvPropInt( RECVINFO( m_iWeaponID ) ), +RecvPropInt( RECVINFO( m_iMode ) ), +RecvPropInt( RECVINFO( m_iSeed ) ), +RecvPropInt( RECVINFO( m_iPlayer ) ), +RecvPropFloat( RECVINFO( m_flSpread ) ), +RecvPropInt( RECVINFO( m_bCritical ) ), +END_RECV_TABLE() + +void C_TEFireBullets::PostDataUpdate( DataUpdateType_t updateType ) +{ + VPROF( "C_TEFireBullets::PostDataUpdate" ); + + // Create the effect. + m_vecAngles.z = 0; + FX_FireBullets( NULL, m_iPlayer+1, m_vecOrigin, m_vecAngles, m_iWeaponID, m_iMode, m_iSeed, m_flSpread, -1, m_bCritical ); +}
\ No newline at end of file |