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/c_te_energysplash.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/c_te_energysplash.cpp')
| -rw-r--r-- | game/client/c_te_energysplash.cpp | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/game/client/c_te_energysplash.cpp b/game/client/c_te_energysplash.cpp new file mode 100644 index 0000000..b88aea7 --- /dev/null +++ b/game/client/c_te_energysplash.cpp @@ -0,0 +1,90 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// $NoKeywords: $ +//=============================================================================// +#include "cbase.h" +#include "c_basetempentity.h" +#include "IEffects.h" +#include "tier0/vprof.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//----------------------------------------------------------------------------- +// Purpose: Energy Splash TE +//----------------------------------------------------------------------------- +class C_TEEnergySplash : public C_BaseTempEntity +{ +public: + DECLARE_CLIENTCLASS(); + + C_TEEnergySplash( void ); + virtual ~C_TEEnergySplash( void ); + + virtual void PostDataUpdate( DataUpdateType_t updateType ); + + virtual void Precache( void ); + +public: + Vector m_vecPos; + Vector m_vecDir; + bool m_bExplosive; + + const struct model_t *m_pModel; +}; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +C_TEEnergySplash::C_TEEnergySplash( void ) +{ + m_vecPos.Init(); + m_vecDir.Init(); + m_bExplosive = false; + m_pModel = NULL; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +C_TEEnergySplash::~C_TEEnergySplash( void ) +{ +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void C_TEEnergySplash::Precache( void ) +{ +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : bool - +//----------------------------------------------------------------------------- +void C_TEEnergySplash::PostDataUpdate( DataUpdateType_t updateType ) +{ + VPROF( "C_TEEnergySplash::PostDataUpdate" ); + + g_pEffects->EnergySplash( m_vecPos, m_vecDir, m_bExplosive ); +} + +void TE_EnergySplash( IRecipientFilter& filter, float delay, + const Vector* pos, const Vector* dir, bool bExplosive ) +{ + g_pEffects->EnergySplash( *pos, *dir, bExplosive ); +} + +// Expose the TE to the engine. +IMPLEMENT_CLIENTCLASS_EVENT( C_TEEnergySplash, DT_TEEnergySplash, CTEEnergySplash ); + +BEGIN_RECV_TABLE_NOBASE(C_TEEnergySplash, DT_TEEnergySplash) + RecvPropVector(RECVINFO(m_vecPos)), + RecvPropVector(RECVINFO(m_vecDir)), + RecvPropInt(RECVINFO(m_bExplosive)), +END_RECV_TABLE() + |