summaryrefslogtreecommitdiff
path: root/game/client/c_func_dust.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/client/c_func_dust.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/c_func_dust.h')
-rw-r--r--game/client/c_func_dust.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/game/client/c_func_dust.h b/game/client/c_func_dust.h
new file mode 100644
index 0000000..31ff061
--- /dev/null
+++ b/game/client/c_func_dust.h
@@ -0,0 +1,112 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef C_FUNC_DUST_H
+#define C_FUNC_DUST_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "c_baseentity.h"
+#include "particles_simple.h"
+#include "particle_util.h"
+#include "bspflags.h"
+
+
+
+// ------------------------------------------------------------------------------------ //
+// CDustEffect particle renderer.
+// ------------------------------------------------------------------------------------ //
+
+class C_Func_Dust;
+
+class CFuncDustParticle : public Particle
+{
+public:
+ Vector m_vVelocity;
+ float m_flLifetime;
+ float m_flDieTime;
+ float m_flSize;
+ color32 m_Color;
+};
+
+class CDustEffect : public CParticleEffect
+{
+public:
+ CDustEffect( const char *pDebugName ) : CParticleEffect( pDebugName ) {}
+
+ virtual void RenderParticles( CParticleRenderIterator *pIterator );
+ virtual void SimulateParticles( CParticleSimulateIterator *pIterator );
+
+ C_Func_Dust *m_pDust;
+
+private:
+ CDustEffect( const CDustEffect & ); // not defined, not accessible
+};
+
+
+// ------------------------------------------------------------------------------------ //
+// C_Func_Dust class.
+// ------------------------------------------------------------------------------------ //
+
+class C_Func_Dust : public C_BaseEntity
+{
+public:
+ DECLARE_CLASS( C_Func_Dust, C_BaseEntity );
+ DECLARE_CLIENTCLASS();
+
+ C_Func_Dust();
+ virtual ~C_Func_Dust();
+ virtual void OnDataChanged( DataUpdateType_t updateType );
+ virtual void ClientThink();
+ virtual bool ShouldDraw();
+
+
+private:
+
+ void AttemptSpawnNewParticle();
+
+
+
+// Vars from server.
+public:
+
+ color32 m_Color;
+ int m_SpawnRate;
+
+ float m_flSizeMin;
+ float m_flSizeMax;
+
+ int m_SpeedMax;
+
+ int m_LifetimeMin;
+ int m_LifetimeMax;
+
+ int m_DistMax;
+
+ float m_FallSpeed; // extra 'gravity'
+
+
+public:
+
+ int m_DustFlags; // Combination of DUSTFLAGS_
+
+
+
+public:
+ CDustEffect m_Effect;
+ PMaterialHandle m_hMaterial;
+ TimedEvent m_Spawner;
+
+private:
+ C_Func_Dust( const C_Func_Dust & ); // not defined, not accessible
+};
+
+
+
+#endif // C_FUNC_DUST_H