aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/fx_envelope.h
blob: 3f1997f5869480ca57ec99e231144bbed79469e2 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef FX_ENVELOPE_H
#define FX_ENVELOPE_H
#ifdef _WIN32
#pragma once
#endif

#include "cbase.h"
#include "fx.h"
#include "view.h"
#include "view_scene.h"
#include "materialsystem/imaterialvar.h"

class C_EnvelopeFX : public CDefaultClientRenderable
{
public:
	typedef CDefaultClientRenderable	BaseClass;

	C_EnvelopeFX();
	virtual ~C_EnvelopeFX();

	virtual void Update( void );

	// IClientRenderable
	virtual const Vector&			GetRenderOrigin( void ) { return m_worldPosition; }
	virtual void					SetRenderOrigin( const Vector &origin ) { m_worldPosition = origin; }
	virtual const QAngle&			GetRenderAngles( void ) { return vec3_angle; }
	virtual const matrix3x4_t &		RenderableToWorldTransform();
	virtual bool					ShouldDraw( void ) { return true; }
	virtual bool					IsTransparent( void ) { return true; }
	virtual bool					ShouldReceiveProjectedTextures( int flags ) { return false; }

	void	SetTime( float t ) { m_t = t; }
	void	LimitTime( float tmax ) { m_tMax = tmax; }
	void	SetActive( bool state = true ) { m_active = state; }
	bool	IsActive( void ) const { return m_active; }

	virtual void EffectInit( int entityIndex, int attachment );
	virtual void EffectShutdown( void );

protected:

	void RemoveRenderable();


	int						m_entityIndex;
	int						m_attachment;
	bool					m_active;
	float					m_t;
	float					m_tMax;
	Vector					m_worldPosition;
};

#endif // FX_ENVELOPE_H