1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "cbase.h"
#include "te_particlesystem.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//=============================================================================
// Gauss explosion
//=============================================================================
class CTEGaussExplosion : public CTEParticleSystem
{
public:
DECLARE_CLASS( CTEGaussExplosion, CTEParticleSystem );
DECLARE_SERVERCLASS();
CTEGaussExplosion( const char *name );
virtual ~CTEGaussExplosion( void );
virtual void Test( const Vector& current_origin, const QAngle& current_angles ) { };
CNetworkVar( int, m_nType );
CNetworkVector( m_vecDirection );
};
CTEGaussExplosion::CTEGaussExplosion( const char *name ) : BaseClass( name )
{
m_nType = 0;
m_vecDirection.Init();
}
CTEGaussExplosion::~CTEGaussExplosion( void )
{
}
IMPLEMENT_SERVERCLASS_ST( CTEGaussExplosion, DT_TEGaussExplosion )
SendPropInt( SENDINFO(m_nType), 2, SPROP_UNSIGNED ),
SendPropVector( SENDINFO(m_vecDirection), -1, SPROP_COORD ),
END_SEND_TABLE()
static CTEGaussExplosion g_TEGaussExplosion( "GaussExplosion" );
//-----------------------------------------------------------------------------
// Purpose:
// Input : &pos -
// &angles -
//-----------------------------------------------------------------------------
void TE_GaussExplosion( IRecipientFilter& filter, float delay,
const Vector &pos, const Vector &dir, int type )
{
g_TEGaussExplosion.m_vecOrigin = pos;
g_TEGaussExplosion.m_vecDirection = dir;
g_TEGaussExplosion.m_nType = type;
//Send it
g_TEGaussExplosion.Create( filter, delay );
}
|