aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/te_explosion.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/te_explosion.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/te_explosion.cpp')
-rw-r--r--mp/src/game/server/te_explosion.cpp262
1 files changed, 131 insertions, 131 deletions
diff --git a/mp/src/game/server/te_explosion.cpp b/mp/src/game/server/te_explosion.cpp
index fccf0b2e..2c53b1b1 100644
--- a/mp/src/game/server/te_explosion.cpp
+++ b/mp/src/game/server/te_explosion.cpp
@@ -1,132 +1,132 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $Workfile: $
-// $Date: $
-//
-//-----------------------------------------------------------------------------
-// $Log: $
-//
-// $NoKeywords: $
-//=============================================================================//
-#include "cbase.h"
-#include "te_particlesystem.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-extern short g_sModelIndexFireball; // (in combatweapon.cpp) holds the index for the smoke cloud
-
-//-----------------------------------------------------------------------------
-// Purpose: Dispatches explosion tempentity
-//-----------------------------------------------------------------------------
-class CTEExplosion : public CTEParticleSystem
-{
-public:
- DECLARE_CLASS( CTEExplosion, CTEParticleSystem );
- DECLARE_SERVERCLASS();
-
- CTEExplosion( const char *name );
- virtual ~CTEExplosion( void );
-
- virtual void Test( const Vector& current_origin, const QAngle& current_angles );
-
-
-public:
- CNetworkVar( int, m_nModelIndex );
- CNetworkVar( float, m_fScale );
- CNetworkVar( int, m_nFrameRate );
- CNetworkVar( int, m_nFlags );
- CNetworkVector( m_vecNormal );
- CNetworkVar( unsigned char, m_chMaterialType );
- CNetworkVar( int, m_nRadius );
- CNetworkVar( int, m_nMagnitude );
-};
-
-//-----------------------------------------------------------------------------
-// Purpose:
-// Input : *name -
-//-----------------------------------------------------------------------------
-CTEExplosion::CTEExplosion( const char *name ) :
- BaseClass( name )
-{
- m_nModelIndex = 0;
- m_fScale = 0;
- m_nFrameRate = 0;
- m_nFlags = 0;
- m_vecNormal.Init();
- m_chMaterialType = 'C';
- m_nRadius = 0;
- m_nMagnitude = 0;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-CTEExplosion::~CTEExplosion( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-// Input : *current_origin -
-// *current_angles -
-//-----------------------------------------------------------------------------
-void CTEExplosion::Test( const Vector& current_origin, const QAngle& current_angles )
-{
- // Fill in data
- m_nModelIndex = g_sModelIndexFireball;
- m_fScale = 0.5;
- m_nFrameRate = 15;
- m_nFlags = TE_EXPLFLAG_NONE;
- m_vecOrigin = current_origin;
-
- Vector forward;
-
- m_vecOrigin.GetForModify()[2] += 24;
-
- AngleVectors( current_angles, &forward );
- forward[2] = 0.0;
- VectorNormalize( forward );
-
- m_vecOrigin += forward * 50;
-
- CBroadcastRecipientFilter filter;
- Create( filter, 0.0 );
-}
-
-IMPLEMENT_SERVERCLASS_ST(CTEExplosion, DT_TEExplosion)
- SendPropModelIndex( SENDINFO(m_nModelIndex) ),
- SendPropFloat( SENDINFO(m_fScale ), 9, 0, 0.0, 51.2 ),
- SendPropInt( SENDINFO(m_nFrameRate), 8, SPROP_UNSIGNED ),
- SendPropInt( SENDINFO(m_nFlags), 8, SPROP_UNSIGNED ),
- SendPropVector( SENDINFO(m_vecNormal), -1, SPROP_COORD),
- SendPropInt( SENDINFO(m_chMaterialType), 8, SPROP_UNSIGNED ),
- SendPropInt( SENDINFO(m_nRadius), 32, SPROP_UNSIGNED ),
- SendPropInt( SENDINFO(m_nMagnitude), 32, SPROP_UNSIGNED ),
-END_SEND_TABLE()
-
-// Singleton to fire TEExplosion objects
-static CTEExplosion g_TEExplosion( "Explosion" );
-
-void TE_Explosion( IRecipientFilter& filter, float delay,
- const Vector* pos, int modelindex, float scale, int framerate, int flags, int radius, int magnitude, const Vector* normal, unsigned char materialType )
-{
- g_TEExplosion.m_vecOrigin = *pos;
- g_TEExplosion.m_nModelIndex = modelindex;
- g_TEExplosion.m_fScale = scale;
- g_TEExplosion.m_nFrameRate = framerate;
- g_TEExplosion.m_nFlags = flags;
- g_TEExplosion.m_nRadius = radius;
- g_TEExplosion.m_nMagnitude = magnitude;
-
- if ( normal )
- g_TEExplosion.m_vecNormal = *normal;
- else
- g_TEExplosion.m_vecNormal = Vector(0,0,1);
- g_TEExplosion.m_chMaterialType = materialType;
-
- // Send it over the wire
- g_TEExplosion.Create( filter, delay );
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "te_particlesystem.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+extern short g_sModelIndexFireball; // (in combatweapon.cpp) holds the index for the smoke cloud
+
+//-----------------------------------------------------------------------------
+// Purpose: Dispatches explosion tempentity
+//-----------------------------------------------------------------------------
+class CTEExplosion : public CTEParticleSystem
+{
+public:
+ DECLARE_CLASS( CTEExplosion, CTEParticleSystem );
+ DECLARE_SERVERCLASS();
+
+ CTEExplosion( const char *name );
+ virtual ~CTEExplosion( void );
+
+ virtual void Test( const Vector& current_origin, const QAngle& current_angles );
+
+
+public:
+ CNetworkVar( int, m_nModelIndex );
+ CNetworkVar( float, m_fScale );
+ CNetworkVar( int, m_nFrameRate );
+ CNetworkVar( int, m_nFlags );
+ CNetworkVector( m_vecNormal );
+ CNetworkVar( unsigned char, m_chMaterialType );
+ CNetworkVar( int, m_nRadius );
+ CNetworkVar( int, m_nMagnitude );
+};
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : *name -
+//-----------------------------------------------------------------------------
+CTEExplosion::CTEExplosion( const char *name ) :
+ BaseClass( name )
+{
+ m_nModelIndex = 0;
+ m_fScale = 0;
+ m_nFrameRate = 0;
+ m_nFlags = 0;
+ m_vecNormal.Init();
+ m_chMaterialType = 'C';
+ m_nRadius = 0;
+ m_nMagnitude = 0;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+CTEExplosion::~CTEExplosion( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : *current_origin -
+// *current_angles -
+//-----------------------------------------------------------------------------
+void CTEExplosion::Test( const Vector& current_origin, const QAngle& current_angles )
+{
+ // Fill in data
+ m_nModelIndex = g_sModelIndexFireball;
+ m_fScale = 0.5;
+ m_nFrameRate = 15;
+ m_nFlags = TE_EXPLFLAG_NONE;
+ m_vecOrigin = current_origin;
+
+ Vector forward;
+
+ m_vecOrigin.GetForModify()[2] += 24;
+
+ AngleVectors( current_angles, &forward );
+ forward[2] = 0.0;
+ VectorNormalize( forward );
+
+ m_vecOrigin += forward * 50;
+
+ CBroadcastRecipientFilter filter;
+ Create( filter, 0.0 );
+}
+
+IMPLEMENT_SERVERCLASS_ST(CTEExplosion, DT_TEExplosion)
+ SendPropModelIndex( SENDINFO(m_nModelIndex) ),
+ SendPropFloat( SENDINFO(m_fScale ), 9, 0, 0.0, 51.2 ),
+ SendPropInt( SENDINFO(m_nFrameRate), 8, SPROP_UNSIGNED ),
+ SendPropInt( SENDINFO(m_nFlags), 8, SPROP_UNSIGNED ),
+ SendPropVector( SENDINFO(m_vecNormal), -1, SPROP_COORD),
+ SendPropInt( SENDINFO(m_chMaterialType), 8, SPROP_UNSIGNED ),
+ SendPropInt( SENDINFO(m_nRadius), 32, SPROP_UNSIGNED ),
+ SendPropInt( SENDINFO(m_nMagnitude), 32, SPROP_UNSIGNED ),
+END_SEND_TABLE()
+
+// Singleton to fire TEExplosion objects
+static CTEExplosion g_TEExplosion( "Explosion" );
+
+void TE_Explosion( IRecipientFilter& filter, float delay,
+ const Vector* pos, int modelindex, float scale, int framerate, int flags, int radius, int magnitude, const Vector* normal, unsigned char materialType )
+{
+ g_TEExplosion.m_vecOrigin = *pos;
+ g_TEExplosion.m_nModelIndex = modelindex;
+ g_TEExplosion.m_fScale = scale;
+ g_TEExplosion.m_nFrameRate = framerate;
+ g_TEExplosion.m_nFlags = flags;
+ g_TEExplosion.m_nRadius = radius;
+ g_TEExplosion.m_nMagnitude = magnitude;
+
+ if ( normal )
+ g_TEExplosion.m_vecNormal = *normal;
+ else
+ g_TEExplosion.m_vecNormal = Vector(0,0,1);
+ g_TEExplosion.m_chMaterialType = materialType;
+
+ // Send it over the wire
+ g_TEExplosion.Create( filter, delay );
} \ No newline at end of file