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_envelope.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_envelope.cpp')
| -rw-r--r-- | mp/src/game/client/fx_envelope.cpp | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/mp/src/game/client/fx_envelope.cpp b/mp/src/game/client/fx_envelope.cpp index 88910107..44a9e7e5 100644 --- a/mp/src/game/client/fx_envelope.cpp +++ b/mp/src/game/client/fx_envelope.cpp @@ -1,82 +1,82 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#include "cbase.h"
-#include "fx_envelope.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-//-----------------------------------------------------------------------------
-// Constructor
-//-----------------------------------------------------------------------------
-C_EnvelopeFX::C_EnvelopeFX( void )
-{
- m_active = false;
-}
-
-C_EnvelopeFX::~C_EnvelopeFX()
-{
- RemoveRenderable();
-}
-
-const matrix3x4_t & C_EnvelopeFX::RenderableToWorldTransform()
-{
- static matrix3x4_t mat;
- SetIdentityMatrix( mat );
- PositionMatrix( GetRenderOrigin(), mat );
- return mat;
-}
-
-void C_EnvelopeFX::RemoveRenderable()
-{
- ClientLeafSystem()->RemoveRenderable( m_hRenderHandle );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Updates the envelope being in the client's known entity list
-//-----------------------------------------------------------------------------
-void C_EnvelopeFX::Update( void )
-{
- if ( m_active )
- {
- if ( m_hRenderHandle == INVALID_CLIENT_RENDER_HANDLE )
- {
- ClientLeafSystem()->AddRenderable( this, RENDER_GROUP_TRANSLUCENT_ENTITY );
- }
- else
- {
- ClientLeafSystem()->RenderableChanged( m_hRenderHandle );
- }
- }
- else
- {
- RemoveRenderable();
- }
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Starts up the effect
-// Input : entityIndex - entity to be attached to
-// attachment - attachment point (if any) to be attached to
-//-----------------------------------------------------------------------------
-void C_EnvelopeFX::EffectInit( int entityIndex, int attachment )
-{
- m_entityIndex = entityIndex;
- m_attachment = attachment;
-
- m_active = 1;
- m_t = 0;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Shuts down the effect
-//-----------------------------------------------------------------------------
-void C_EnvelopeFX::EffectShutdown( void )
-{
- m_active = 0;
- m_t = 0;
-}
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "fx_envelope.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//----------------------------------------------------------------------------- +// Constructor +//----------------------------------------------------------------------------- +C_EnvelopeFX::C_EnvelopeFX( void ) +{ + m_active = false; +} + +C_EnvelopeFX::~C_EnvelopeFX() +{ + RemoveRenderable(); +} + +const matrix3x4_t & C_EnvelopeFX::RenderableToWorldTransform() +{ + static matrix3x4_t mat; + SetIdentityMatrix( mat ); + PositionMatrix( GetRenderOrigin(), mat ); + return mat; +} + +void C_EnvelopeFX::RemoveRenderable() +{ + ClientLeafSystem()->RemoveRenderable( m_hRenderHandle ); +} + +//----------------------------------------------------------------------------- +// Purpose: Updates the envelope being in the client's known entity list +//----------------------------------------------------------------------------- +void C_EnvelopeFX::Update( void ) +{ + if ( m_active ) + { + if ( m_hRenderHandle == INVALID_CLIENT_RENDER_HANDLE ) + { + ClientLeafSystem()->AddRenderable( this, RENDER_GROUP_TRANSLUCENT_ENTITY ); + } + else + { + ClientLeafSystem()->RenderableChanged( m_hRenderHandle ); + } + } + else + { + RemoveRenderable(); + } +} + +//----------------------------------------------------------------------------- +// Purpose: Starts up the effect +// Input : entityIndex - entity to be attached to +// attachment - attachment point (if any) to be attached to +//----------------------------------------------------------------------------- +void C_EnvelopeFX::EffectInit( int entityIndex, int attachment ) +{ + m_entityIndex = entityIndex; + m_attachment = attachment; + + m_active = 1; + m_t = 0; +} + +//----------------------------------------------------------------------------- +// Purpose: Shuts down the effect +//----------------------------------------------------------------------------- +void C_EnvelopeFX::EffectShutdown( void ) +{ + m_active = 0; + m_t = 0; +} |