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/c_te_muzzleflash.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/c_te_muzzleflash.cpp')
| -rw-r--r-- | mp/src/game/client/c_te_muzzleflash.cpp | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/mp/src/game/client/c_te_muzzleflash.cpp b/mp/src/game/client/c_te_muzzleflash.cpp index 3a86a00d..529aa781 100644 --- a/mp/src/game/client/c_te_muzzleflash.cpp +++ b/mp/src/game/client/c_te_muzzleflash.cpp @@ -1,112 +1,112 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Muzzle flash temp ent
-//
-// $NoKeywords: $
-//===========================================================================//
-#include "cbase.h"
-#include "c_basetempentity.h"
-#include "IEffects.h"
-#include "tier1/KeyValues.h"
-#include "toolframework_client.h"
-#include "tier0/vprof.h"
-
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-//-----------------------------------------------------------------------------
-// Purpose: User Tracer TE
-//-----------------------------------------------------------------------------
-class C_TEMuzzleFlash : public C_BaseTempEntity
-{
-public:
- DECLARE_CLASS( C_TEMuzzleFlash, C_BaseTempEntity );
-
- DECLARE_CLIENTCLASS();
-
- C_TEMuzzleFlash( void );
- virtual ~C_TEMuzzleFlash( void );
-
- virtual void PostDataUpdate( DataUpdateType_t updateType );
-
-public:
- Vector m_vecOrigin;
- QAngle m_vecAngles;
- float m_flScale;
- int m_nType;
-};
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-C_TEMuzzleFlash::C_TEMuzzleFlash( void )
-{
- m_vecOrigin.Init();
- m_vecAngles.Init();
- m_flScale = 1.0f;
- m_nType = 0;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-C_TEMuzzleFlash::~C_TEMuzzleFlash( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Recording
-//-----------------------------------------------------------------------------
-static inline void RecordMuzzleFlash( const Vector &start, const QAngle &angles, float scale, int type )
-{
- if ( !ToolsEnabled() )
- return;
-
- if ( clienttools->IsInRecordingMode() )
- {
- KeyValues *msg = new KeyValues( "TempEntity" );
-
- msg->SetInt( "te", TE_MUZZLE_FLASH );
- msg->SetString( "name", "TE_MuzzleFlash" );
- msg->SetFloat( "time", gpGlobals->curtime );
- msg->SetFloat( "originx", start.x );
- msg->SetFloat( "originy", start.y );
- msg->SetFloat( "originz", start.z );
- msg->SetFloat( "anglesx", angles.x );
- msg->SetFloat( "anglesy", angles.y );
- msg->SetFloat( "anglesz", angles.z );
- msg->SetFloat( "scale", scale );
- msg->SetInt( "type", type );
-
- ToolFramework_PostToolMessage( HTOOLHANDLE_INVALID, msg );
- msg->deleteThis();
- }
-}
-
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void C_TEMuzzleFlash::PostDataUpdate( DataUpdateType_t updateType )
-{
- VPROF( "C_TEMuzzleFlash::PostDataUpdate" );
-
- //FIXME: Index is incorrect
- g_pEffects->MuzzleFlash( m_vecOrigin, m_vecAngles, m_flScale, m_nType );
- RecordMuzzleFlash( m_vecOrigin, m_vecAngles, m_flScale, m_nType );
-}
-
-void TE_MuzzleFlash( IRecipientFilter& filter, float delay,
- const Vector &start, const QAngle &angles, float scale, int type )
-{
- g_pEffects->MuzzleFlash( start, angles, scale, 0 );
- RecordMuzzleFlash( start, angles, scale, 0 );
-}
-
-IMPLEMENT_CLIENTCLASS_EVENT_DT(C_TEMuzzleFlash, DT_TEMuzzleFlash, CTEMuzzleFlash)
- RecvPropVector( RECVINFO(m_vecOrigin)),
- RecvPropVector( RECVINFO(m_vecAngles)),
- RecvPropFloat( RECVINFO(m_flScale)),
- RecvPropInt( RECVINFO(m_nType)),
-END_RECV_TABLE()
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Muzzle flash temp ent +// +// $NoKeywords: $ +//===========================================================================// +#include "cbase.h" +#include "c_basetempentity.h" +#include "IEffects.h" +#include "tier1/KeyValues.h" +#include "toolframework_client.h" +#include "tier0/vprof.h" + + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//----------------------------------------------------------------------------- +// Purpose: User Tracer TE +//----------------------------------------------------------------------------- +class C_TEMuzzleFlash : public C_BaseTempEntity +{ +public: + DECLARE_CLASS( C_TEMuzzleFlash, C_BaseTempEntity ); + + DECLARE_CLIENTCLASS(); + + C_TEMuzzleFlash( void ); + virtual ~C_TEMuzzleFlash( void ); + + virtual void PostDataUpdate( DataUpdateType_t updateType ); + +public: + Vector m_vecOrigin; + QAngle m_vecAngles; + float m_flScale; + int m_nType; +}; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +C_TEMuzzleFlash::C_TEMuzzleFlash( void ) +{ + m_vecOrigin.Init(); + m_vecAngles.Init(); + m_flScale = 1.0f; + m_nType = 0; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +C_TEMuzzleFlash::~C_TEMuzzleFlash( void ) +{ +} + +//----------------------------------------------------------------------------- +// Recording +//----------------------------------------------------------------------------- +static inline void RecordMuzzleFlash( const Vector &start, const QAngle &angles, float scale, int type ) +{ + if ( !ToolsEnabled() ) + return; + + if ( clienttools->IsInRecordingMode() ) + { + KeyValues *msg = new KeyValues( "TempEntity" ); + + msg->SetInt( "te", TE_MUZZLE_FLASH ); + msg->SetString( "name", "TE_MuzzleFlash" ); + msg->SetFloat( "time", gpGlobals->curtime ); + msg->SetFloat( "originx", start.x ); + msg->SetFloat( "originy", start.y ); + msg->SetFloat( "originz", start.z ); + msg->SetFloat( "anglesx", angles.x ); + msg->SetFloat( "anglesy", angles.y ); + msg->SetFloat( "anglesz", angles.z ); + msg->SetFloat( "scale", scale ); + msg->SetInt( "type", type ); + + ToolFramework_PostToolMessage( HTOOLHANDLE_INVALID, msg ); + msg->deleteThis(); + } +} + + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void C_TEMuzzleFlash::PostDataUpdate( DataUpdateType_t updateType ) +{ + VPROF( "C_TEMuzzleFlash::PostDataUpdate" ); + + //FIXME: Index is incorrect + g_pEffects->MuzzleFlash( m_vecOrigin, m_vecAngles, m_flScale, m_nType ); + RecordMuzzleFlash( m_vecOrigin, m_vecAngles, m_flScale, m_nType ); +} + +void TE_MuzzleFlash( IRecipientFilter& filter, float delay, + const Vector &start, const QAngle &angles, float scale, int type ) +{ + g_pEffects->MuzzleFlash( start, angles, scale, 0 ); + RecordMuzzleFlash( start, angles, scale, 0 ); +} + +IMPLEMENT_CLIENTCLASS_EVENT_DT(C_TEMuzzleFlash, DT_TEMuzzleFlash, CTEMuzzleFlash) + RecvPropVector( RECVINFO(m_vecOrigin)), + RecvPropVector( RECVINFO(m_vecAngles)), + RecvPropFloat( RECVINFO(m_flScale)), + RecvPropInt( RECVINFO(m_nType)), +END_RECV_TABLE() |