diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/shared/baseparticleentity.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/shared/baseparticleentity.h')
| -rw-r--r-- | mp/src/game/shared/baseparticleentity.h | 200 |
1 files changed, 100 insertions, 100 deletions
diff --git a/mp/src/game/shared/baseparticleentity.h b/mp/src/game/shared/baseparticleentity.h index 5f7ad3f4..7de9f4a7 100644 --- a/mp/src/game/shared/baseparticleentity.h +++ b/mp/src/game/shared/baseparticleentity.h @@ -1,100 +1,100 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-
-// Particle system entities can derive from this to handle some of the mundane
-// functionality of hooking into the engine's entity system.
-
-#ifndef PARTICLE_BASEEFFECT_H
-#define PARTICLE_BASEEFFECT_H
-
-#include "predictable_entity.h"
-#include "baseentity_shared.h"
-
-#if defined( CLIENT_DLL )
-#define CBaseParticleEntity C_BaseParticleEntity
-
-#include "particlemgr.h"
-
-#endif
-
-class CBaseParticleEntity : public CBaseEntity
-#if defined( CLIENT_DLL )
-, public IParticleEffect
-#endif
-{
-public:
- DECLARE_CLASS( CBaseParticleEntity, CBaseEntity );
- DECLARE_PREDICTABLE();
- DECLARE_NETWORKCLASS();
-
- CBaseParticleEntity();
- virtual ~CBaseParticleEntity();
-
- // CBaseEntity overrides.
-public:
-#if !defined( CLIENT_DLL )
- virtual int UpdateTransmitState( void );
-#else
-// Default IParticleEffect overrides.
-public:
-
- virtual bool ShouldSimulate() const { return m_bSimulate; }
- virtual void SetShouldSimulate( bool bSim ) { m_bSimulate = bSim; }
-
- virtual void SimulateParticles( CParticleSimulateIterator *pIterator );
- virtual void RenderParticles( CParticleRenderIterator *pIterator );
- virtual const Vector & GetSortOrigin();
-public:
- CParticleEffectBinding m_ParticleEffect;
-#endif
-
- virtual void Activate();
- virtual void Think();
-
-#if defined( CLIENT_DLL )
- // NOTE: Ths enclosed particle effect binding will do all the drawing
- virtual bool ShouldDraw() { return false; }
-
- int AllocateToolParticleEffectId();
- int GetToolParticleEffectId() const;
-
-private:
- int m_nToolParticleEffectId;
- bool m_bSimulate;
-#endif
-
-public:
- void FollowEntity(CBaseEntity *pEntity);
-
- // UTIL_Remove will be called after the specified amount of time.
- // If you pass in -1, the entity will never go away automatically.
- void SetLifetime(float lifetime);
-
-private:
- CBaseParticleEntity( const CBaseParticleEntity & ); // not defined, not accessible
-};
-
-
-#if defined( CLIENT_DLL )
-
-inline int CBaseParticleEntity::GetToolParticleEffectId() const
-{
- return m_nToolParticleEffectId;
-}
-
-inline int CBaseParticleEntity::AllocateToolParticleEffectId()
-{
- m_nToolParticleEffectId = ParticleMgr()->AllocateToolParticleEffectId();
- return m_nToolParticleEffectId;
-}
-
-#endif // CLIENT_DLL
-
-#endif
-
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// + +// Particle system entities can derive from this to handle some of the mundane +// functionality of hooking into the engine's entity system. + +#ifndef PARTICLE_BASEEFFECT_H +#define PARTICLE_BASEEFFECT_H + +#include "predictable_entity.h" +#include "baseentity_shared.h" + +#if defined( CLIENT_DLL ) +#define CBaseParticleEntity C_BaseParticleEntity + +#include "particlemgr.h" + +#endif + +class CBaseParticleEntity : public CBaseEntity +#if defined( CLIENT_DLL ) +, public IParticleEffect +#endif +{ +public: + DECLARE_CLASS( CBaseParticleEntity, CBaseEntity ); + DECLARE_PREDICTABLE(); + DECLARE_NETWORKCLASS(); + + CBaseParticleEntity(); + virtual ~CBaseParticleEntity(); + + // CBaseEntity overrides. +public: +#if !defined( CLIENT_DLL ) + virtual int UpdateTransmitState( void ); +#else +// Default IParticleEffect overrides. +public: + + virtual bool ShouldSimulate() const { return m_bSimulate; } + virtual void SetShouldSimulate( bool bSim ) { m_bSimulate = bSim; } + + virtual void SimulateParticles( CParticleSimulateIterator *pIterator ); + virtual void RenderParticles( CParticleRenderIterator *pIterator ); + virtual const Vector & GetSortOrigin(); +public: + CParticleEffectBinding m_ParticleEffect; +#endif + + virtual void Activate(); + virtual void Think(); + +#if defined( CLIENT_DLL ) + // NOTE: Ths enclosed particle effect binding will do all the drawing + virtual bool ShouldDraw() { return false; } + + int AllocateToolParticleEffectId(); + int GetToolParticleEffectId() const; + +private: + int m_nToolParticleEffectId; + bool m_bSimulate; +#endif + +public: + void FollowEntity(CBaseEntity *pEntity); + + // UTIL_Remove will be called after the specified amount of time. + // If you pass in -1, the entity will never go away automatically. + void SetLifetime(float lifetime); + +private: + CBaseParticleEntity( const CBaseParticleEntity & ); // not defined, not accessible +}; + + +#if defined( CLIENT_DLL ) + +inline int CBaseParticleEntity::GetToolParticleEffectId() const +{ + return m_nToolParticleEffectId; +} + +inline int CBaseParticleEntity::AllocateToolParticleEffectId() +{ + m_nToolParticleEffectId = ParticleMgr()->AllocateToolParticleEffectId(); + return m_nToolParticleEffectId; +} + +#endif // CLIENT_DLL + +#endif + + |