aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/c_te_beamfollow.cpp
blob: a8e6f4f218ca42b29148dd1e67499cdc25c6b48c (plain) (blame)
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
68
69
70
71
72
73
74
75
76
77
78
79
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $Workfile:     $
// $Date:         $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "c_te_basebeam.h"
#include "iviewrender_beams.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
class C_TEBeamFollow : public C_TEBaseBeam
{
public:
	DECLARE_CLASS( C_TEBeamFollow, C_TEBaseBeam );
	DECLARE_CLIENTCLASS();

					C_TEBeamFollow( void );
	virtual			~C_TEBeamFollow( void );

	virtual void	PostDataUpdate( DataUpdateType_t updateType );
	
public:

	int m_iEntIndex;
};

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
C_TEBeamFollow::C_TEBeamFollow( void )
{
	m_iEntIndex = 0;
}

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
C_TEBeamFollow::~C_TEBeamFollow( void )
{
}


//-----------------------------------------------------------------------------
// Purpose: 
// Input  : bool - 
//-----------------------------------------------------------------------------
void C_TEBeamFollow::PostDataUpdate( DataUpdateType_t updateType )
{
	beams->CreateBeamFollow( m_iEntIndex, m_nModelIndex, m_nHaloIndex, 0, m_fLife,
		m_fWidth, m_fEndWidth, m_nFadeLength, r, g, b, a );
}

// Expose the TE to the engine.
IMPLEMENT_CLIENTCLASS_EVENT( C_TEBeamFollow, DT_TEBeamFollow, CTEBeamFollow );

BEGIN_RECV_TABLE(C_TEBeamFollow, DT_TEBeamFollow)
	RecvPropInt( RECVINFO(m_iEntIndex)),
END_RECV_TABLE()


void TE_BeamFollow( IRecipientFilter& filter, float delay,
	int iEntIndex, int modelIndex, int haloIndex, float life, float width, float endWidth, 
	float fadeLength,float r, float g, float b, float a )
{
	beams->CreateBeamFollow( iEntIndex, modelIndex, haloIndex, 0, life,
		width, endWidth, fadeLength, r, g, b, a );
}