summaryrefslogtreecommitdiff
path: root/game/client/tf/c_playerattachedmodel.h
blob: 2525680e76c41b4a05c8c142b3d199ed69b1f10d (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================

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

#define PAM_PERMANENT			-1

// Flags
#define PAM_SPIN_Z				(1<<0)
#define PAM_ROTATE_RANDOMLY		(1<<1)
#define PAM_SCALEUP				(1<<2)
#define PAM_ANIMATE_RANDOMLY	(1<<3)

//-----------------------------------------------------------------------------
// Purpose: A clientside, visual only model that's attached to players
//-----------------------------------------------------------------------------
class C_PlayerAttachedModel : public C_BaseAnimating
{
	DECLARE_CLASS( C_PlayerAttachedModel, C_BaseAnimating );
public:
	static C_PlayerAttachedModel *Create( const char *pszModelName, C_BaseEntity *pParent, int iAttachment, Vector vecOffset, float flLifetime = 0.2, int iFlags = 0 );

	bool	Initialize( const char *pszModelName, C_BaseEntity *pParent, int iAttachment, Vector vecOffset, float flLifetime, int iFlags );
	void	SetLifetime( float flLifetime );
	void	ClientThink( void );
	void	ApplyBoneMatrixTransform( matrix3x4_t& transform );

private:
	float	m_flExpiresAt;
	int		m_iFlags;
	float	m_flRotateAt;
	float	m_flAnimateAt;
	float	m_flScale;
};

#endif // C_PLAYERATTACHEDMODEL_H