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_blood.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/client/fx_blood.h')
| -rw-r--r-- | mp/src/game/client/fx_blood.h | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/mp/src/game/client/fx_blood.h b/mp/src/game/client/fx_blood.h index c4403d35..4fed5fb2 100644 --- a/mp/src/game/client/fx_blood.h +++ b/mp/src/game/client/fx_blood.h @@ -1,76 +1,76 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef FX_BLOOD_H
-#define FX_BLOOD_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "tier0/memdbgon.h"
-
-class CBloodSprayEmitter : public CSimpleEmitter
-{
-public:
-
- CBloodSprayEmitter( const char *pDebugName ) : CSimpleEmitter( pDebugName ) {}
-
- static CBloodSprayEmitter *Create( const char *pDebugName )
- {
- return new CBloodSprayEmitter( pDebugName );
- }
-
- inline void SetGravity( float flGravity )
- {
- m_flGravity = flGravity;
- }
-
- virtual float UpdateRoll( SimpleParticle *pParticle, float timeDelta )
- {
- pParticle->m_flRoll += pParticle->m_flRollDelta * timeDelta;
-
- pParticle->m_flRollDelta += pParticle->m_flRollDelta * ( timeDelta * -4.0f );
-
- //Cap the minimum roll
- /*
- if ( fabs( pParticle->m_flRollDelta ) < 0.5f )
- {
- pParticle->m_flRollDelta = ( pParticle->m_flRollDelta > 0.0f ) ? 0.5f : -0.5f;
- }
- */
-
- return pParticle->m_flRoll;
- }
-
- virtual void UpdateVelocity( SimpleParticle *pParticle, float timeDelta )
- {
- if ( !( pParticle->m_iFlags & SIMPLE_PARTICLE_FLAG_NO_VEL_DECAY ) )
- {
- //Decelerate
- static float dtime;
- static float decay;
-
- if ( dtime != timeDelta )
- {
- decay = ExponentialDecay( 0.1, 0.4f, dtime );
- dtime = timeDelta;
- }
-
- pParticle->m_vecVelocity *= decay;
- pParticle->m_vecVelocity[2] -= ( m_flGravity * timeDelta );
- }
- }
-
-private:
-
- float m_flGravity;
-
- CBloodSprayEmitter( const CBloodSprayEmitter & );
-};
-
-#include "tier0/memdbgoff.h"
-
-#endif // FX_BLOOD_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef FX_BLOOD_H +#define FX_BLOOD_H +#ifdef _WIN32 +#pragma once +#endif + +#include "tier0/memdbgon.h" + +class CBloodSprayEmitter : public CSimpleEmitter +{ +public: + + CBloodSprayEmitter( const char *pDebugName ) : CSimpleEmitter( pDebugName ) {} + + static CBloodSprayEmitter *Create( const char *pDebugName ) + { + return new CBloodSprayEmitter( pDebugName ); + } + + inline void SetGravity( float flGravity ) + { + m_flGravity = flGravity; + } + + virtual float UpdateRoll( SimpleParticle *pParticle, float timeDelta ) + { + pParticle->m_flRoll += pParticle->m_flRollDelta * timeDelta; + + pParticle->m_flRollDelta += pParticle->m_flRollDelta * ( timeDelta * -4.0f ); + + //Cap the minimum roll + /* + if ( fabs( pParticle->m_flRollDelta ) < 0.5f ) + { + pParticle->m_flRollDelta = ( pParticle->m_flRollDelta > 0.0f ) ? 0.5f : -0.5f; + } + */ + + return pParticle->m_flRoll; + } + + virtual void UpdateVelocity( SimpleParticle *pParticle, float timeDelta ) + { + if ( !( pParticle->m_iFlags & SIMPLE_PARTICLE_FLAG_NO_VEL_DECAY ) ) + { + //Decelerate + static float dtime; + static float decay; + + if ( dtime != timeDelta ) + { + decay = ExponentialDecay( 0.1, 0.4f, dtime ); + dtime = timeDelta; + } + + pParticle->m_vecVelocity *= decay; + pParticle->m_vecVelocity[2] -= ( m_flGravity * timeDelta ); + } + } + +private: + + float m_flGravity; + + CBloodSprayEmitter( const CBloodSprayEmitter & ); +}; + +#include "tier0/memdbgoff.h" + +#endif // FX_BLOOD_H |