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/client/fx_trail.cpp | |
| 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/client/fx_trail.cpp')
| -rw-r--r-- | mp/src/game/client/fx_trail.cpp | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/mp/src/game/client/fx_trail.cpp b/mp/src/game/client/fx_trail.cpp index 7b0ba082..9a090e65 100644 --- a/mp/src/game/client/fx_trail.cpp +++ b/mp/src/game/client/fx_trail.cpp @@ -1,78 +1,78 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#include "cbase.h"
-#include "fx_trail.h"
-
-C_ParticleTrail::C_ParticleTrail( void )
-{
-}
-
-C_ParticleTrail::~C_ParticleTrail( void )
-{
- if ( m_pParticleMgr )
- {
- m_pParticleMgr->RemoveEffect( &m_ParticleEffect );
- }
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Gets the attachment point to spawn at
-//-----------------------------------------------------------------------------
-void C_ParticleTrail::GetAimEntOrigin( IClientEntity *pAttachedTo, Vector *pAbsOrigin, QAngle *pAbsAngles )
-{
- C_BaseEntity *pEnt = pAttachedTo->GetBaseEntity();
-
- if ( pEnt && (m_nAttachment > 0) )
- {
- pEnt->GetAttachment( m_nAttachment, *pAbsOrigin, *pAbsAngles );
- return;
- }
-
- BaseClass::GetAimEntOrigin( pAttachedTo, pAbsOrigin, pAbsAngles );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Turn on the emission of particles
-//-----------------------------------------------------------------------------
-void C_ParticleTrail::SetEmit( bool bEmit )
-{
- m_bEmit = bEmit;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Set the spawn rate of the effect
-//-----------------------------------------------------------------------------
-void C_ParticleTrail::SetSpawnRate( float rate )
-{
- m_SpawnRate = rate;
- m_ParticleSpawn.Init( rate );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: First sent down from the server
-//-----------------------------------------------------------------------------
-void C_ParticleTrail::OnDataChanged(DataUpdateType_t updateType)
-{
- C_BaseEntity::OnDataChanged(updateType);
-
- if ( updateType == DATA_UPDATE_CREATED )
- {
- Start( ParticleMgr(), NULL );
- }
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void C_ParticleTrail::Start( CParticleMgr *pParticleMgr, IPrototypeArgAccess *pArgs )
-{
- if( pParticleMgr->AddEffect( &m_ParticleEffect, this ) == false )
- return;
-
- m_pParticleMgr = pParticleMgr;
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "fx_trail.h" + +C_ParticleTrail::C_ParticleTrail( void ) +{ +} + +C_ParticleTrail::~C_ParticleTrail( void ) +{ + if ( m_pParticleMgr ) + { + m_pParticleMgr->RemoveEffect( &m_ParticleEffect ); + } +} + +//----------------------------------------------------------------------------- +// Purpose: Gets the attachment point to spawn at +//----------------------------------------------------------------------------- +void C_ParticleTrail::GetAimEntOrigin( IClientEntity *pAttachedTo, Vector *pAbsOrigin, QAngle *pAbsAngles ) +{ + C_BaseEntity *pEnt = pAttachedTo->GetBaseEntity(); + + if ( pEnt && (m_nAttachment > 0) ) + { + pEnt->GetAttachment( m_nAttachment, *pAbsOrigin, *pAbsAngles ); + return; + } + + BaseClass::GetAimEntOrigin( pAttachedTo, pAbsOrigin, pAbsAngles ); +} + +//----------------------------------------------------------------------------- +// Purpose: Turn on the emission of particles +//----------------------------------------------------------------------------- +void C_ParticleTrail::SetEmit( bool bEmit ) +{ + m_bEmit = bEmit; +} + +//----------------------------------------------------------------------------- +// Purpose: Set the spawn rate of the effect +//----------------------------------------------------------------------------- +void C_ParticleTrail::SetSpawnRate( float rate ) +{ + m_SpawnRate = rate; + m_ParticleSpawn.Init( rate ); +} + +//----------------------------------------------------------------------------- +// Purpose: First sent down from the server +//----------------------------------------------------------------------------- +void C_ParticleTrail::OnDataChanged(DataUpdateType_t updateType) +{ + C_BaseEntity::OnDataChanged(updateType); + + if ( updateType == DATA_UPDATE_CREATED ) + { + Start( ParticleMgr(), NULL ); + } +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void C_ParticleTrail::Start( CParticleMgr *pParticleMgr, IPrototypeArgAccess *pArgs ) +{ + if( pParticleMgr->AddEffect( &m_ParticleEffect, this ) == false ) + return; + + m_pParticleMgr = pParticleMgr; +} + |