summaryrefslogtreecommitdiff
path: root/game/server/EntityParticleTrail.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/EntityParticleTrail.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/EntityParticleTrail.h')
-rw-r--r--game/server/EntityParticleTrail.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/game/server/EntityParticleTrail.h b/game/server/EntityParticleTrail.h
new file mode 100644
index 0000000..d22e0d4
--- /dev/null
+++ b/game/server/EntityParticleTrail.h
@@ -0,0 +1,52 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef ENTITYPARTICLETRAIL_H
+#define ENTITYPARTICLETRAIL_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "baseparticleentity.h"
+#include "entityparticletrail_shared.h"
+
+
+//-----------------------------------------------------------------------------
+// Spawns particles after the entity
+//-----------------------------------------------------------------------------
+class CEntityParticleTrail : public CBaseParticleEntity
+{
+ DECLARE_DATADESC();
+ DECLARE_CLASS( CEntityParticleTrail, CBaseParticleEntity );
+ DECLARE_SERVERCLASS();
+
+public:
+ static CEntityParticleTrail *Create( CBaseEntity *pTarget, const EntityParticleTrailInfo_t &info, CBaseEntity *pConstraint );
+ static void Destroy( CBaseEntity *pTarget, const EntityParticleTrailInfo_t &info );
+
+ void Spawn();
+ virtual void UpdateOnRemove();
+
+ // Force our constraint entity to be trasmitted
+ virtual void SetTransmit( CCheckTransmitInfo *pInfo, bool bAlways );
+
+ // Clean up when the entity goes away.
+ virtual void NotifySystemEvent( CBaseEntity *pNotify, notify_system_event_t eventType, const notify_system_event_params_t &params );
+
+private:
+ void AttachToEntity( CBaseEntity *pTarget );
+ void IncrementRefCount();
+ void DecrementRefCount();
+
+ CNetworkVar( int, m_iMaterialName );
+ CNetworkVarEmbedded( EntityParticleTrailInfo_t, m_Info );
+ CNetworkHandle( CBaseEntity, m_hConstraintEntity );
+
+ int m_nRefCount;
+};
+
+#endif // ENTITYPARTICLETRAIL_H