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_tesla.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_tesla.cpp')
| -rw-r--r-- | mp/src/game/client/c_tesla.cpp | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/mp/src/game/client/c_tesla.cpp b/mp/src/game/client/c_tesla.cpp index da32e00b..691192a1 100644 --- a/mp/src/game/client/c_tesla.cpp +++ b/mp/src/game/client/c_tesla.cpp @@ -1,65 +1,65 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#include "cbase.h"
-#include "c_tesla.h"
-#include "fx.h"
-#include <bitbuf.h>
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-IMPLEMENT_CLIENTCLASS_DT( C_Tesla, DT_Tesla, CTesla )
- RecvPropString( RECVINFO( m_SoundName ) ),
- RecvPropString( RECVINFO( m_iszSpriteName ) )
-END_RECV_TABLE()
-
-
-C_Tesla::C_Tesla()
-{
-}
-
-void C_Tesla::ReceiveMessage( int classID, bf_read &msg )
-{
- CTeslaInfo teslaInfo;
-
- msg.ReadBitVec3Coord( teslaInfo.m_vPos );
- teslaInfo.m_vAngles.Init();
-
- teslaInfo.m_nEntIndex = msg.ReadShort();
- teslaInfo.m_flRadius = msg.ReadFloat();
-
- teslaInfo.m_vColor.x = ((unsigned char)msg.ReadChar()) / 255.0f;
- teslaInfo.m_vColor.y = ((unsigned char)msg.ReadChar()) / 255.0f;
- teslaInfo.m_vColor.z = ((unsigned char)msg.ReadChar()) / 255.0f;
-
- float flAlpha = 0;
- flAlpha = ((unsigned char)msg.ReadChar()) / 255.0f;
-
- teslaInfo.m_nBeams = msg.ReadChar();
-
- teslaInfo.m_flBeamWidth = msg.ReadFloat();
- teslaInfo.m_flTimeVisible = msg.ReadFloat();
- teslaInfo.m_pszSpriteName = m_iszSpriteName;
-
- EmitSound( m_SoundName );
-
- m_QueuedCommands.AddToTail( teslaInfo );
- SetNextClientThink( CLIENT_THINK_ALWAYS );
-}
-
-
-void C_Tesla::ClientThink()
-{
- FOR_EACH_LL( m_QueuedCommands, i )
- {
- FX_Tesla( m_QueuedCommands[i] );
- }
- m_QueuedCommands.Purge();
- SetNextClientThink( CLIENT_THINK_NEVER );
-}
-
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "c_tesla.h" +#include "fx.h" +#include <bitbuf.h> + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +IMPLEMENT_CLIENTCLASS_DT( C_Tesla, DT_Tesla, CTesla ) + RecvPropString( RECVINFO( m_SoundName ) ), + RecvPropString( RECVINFO( m_iszSpriteName ) ) +END_RECV_TABLE() + + +C_Tesla::C_Tesla() +{ +} + +void C_Tesla::ReceiveMessage( int classID, bf_read &msg ) +{ + CTeslaInfo teslaInfo; + + msg.ReadBitVec3Coord( teslaInfo.m_vPos ); + teslaInfo.m_vAngles.Init(); + + teslaInfo.m_nEntIndex = msg.ReadShort(); + teslaInfo.m_flRadius = msg.ReadFloat(); + + teslaInfo.m_vColor.x = ((unsigned char)msg.ReadChar()) / 255.0f; + teslaInfo.m_vColor.y = ((unsigned char)msg.ReadChar()) / 255.0f; + teslaInfo.m_vColor.z = ((unsigned char)msg.ReadChar()) / 255.0f; + + float flAlpha = 0; + flAlpha = ((unsigned char)msg.ReadChar()) / 255.0f; + + teslaInfo.m_nBeams = msg.ReadChar(); + + teslaInfo.m_flBeamWidth = msg.ReadFloat(); + teslaInfo.m_flTimeVisible = msg.ReadFloat(); + teslaInfo.m_pszSpriteName = m_iszSpriteName; + + EmitSound( m_SoundName ); + + m_QueuedCommands.AddToTail( teslaInfo ); + SetNextClientThink( CLIENT_THINK_ALWAYS ); +} + + +void C_Tesla::ClientThink() +{ + FOR_EACH_LL( m_QueuedCommands, i ) + { + FX_Tesla( m_QueuedCommands[i] ); + } + m_QueuedCommands.Purge(); + SetNextClientThink( CLIENT_THINK_NEVER ); +} + + |