blob: 6013633679e90c489307f6573ebb9696de182878 (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef TF_WEARABLE_H
#define TF_WEARABLE_H
#ifdef _WIN32
#pragma once
#endif
#include "econ_wearable.h"
#include "props_shared.h"
#include "GameEventListener.h"
#if defined( CLIENT_DLL )
#define CTFWearable C_TFWearable
#define CTFWearableVM C_TFWearableVM
#endif
#if defined( CLIENT_DLL )
class CTFWearable : public CEconWearable, public CGameEventListener
#else
class CTFWearable : public CEconWearable
#endif
{
DECLARE_CLASS( CTFWearable, CEconWearable );
public:
DECLARE_NETWORKCLASS();
DECLARE_DATADESC();
CTFWearable();
virtual void Equip( CBasePlayer* pOwner );
virtual void UnEquip( CBasePlayer* pOwner );
virtual bool CanEquip( CBaseEntity *pOther );
void SetDisguiseWearable( bool bState ) { m_bDisguiseWearable = bState; }
bool IsDisguiseWearable( void ) const { return m_bDisguiseWearable; }
void SetWeaponAssociatedWith( CBaseEntity *pWeapon ) { m_hWeaponAssociatedWith = pWeapon; }
CBaseEntity* GetWeaponAssociatedWith( void ) const { return m_hWeaponAssociatedWith.Get(); }
virtual bool UpdateBodygroups( CBaseCombatCharacter* pOwner, int iState );
virtual void ReapplyProvision( void );
#if defined( GAME_DLL )
void Break( void );
virtual int CalculateVisibleClassFor( CBaseCombatCharacter *pPlayer );
virtual int UpdateTransmitState();
virtual int ShouldTransmit( const CCheckTransmitInfo *pInfo );
int GetKillStreak ( ) { return m_iKillStreak; }
void SetKillStreak ( int value ) { m_iKillStreak = value; };
#endif
#if defined( CLIENT_DLL )
virtual int InternalDrawModel( int flags );
virtual bool ShouldDraw();
virtual bool ShouldDrawWhenPlayerIsDead() { return ( GetWeaponAssociatedWith() == NULL ); }
virtual bool ShouldDrawParticleSystems( void ); // can't be const because it potentially mutates m_eParticleSystemVisibility state
virtual int GetWorldModelIndex( void );
virtual void ValidateModelIndex( void );
virtual void OnDataChanged( DataUpdateType_t updateType );
virtual void FireGameEvent( IGameEvent *event );
#endif
virtual int GetSkin( void );
void AddHiddenBodyGroup( const char* bodygroup );
protected:
virtual void InternalSetPlayerDisplayModel( void );
private:
CNetworkVar( bool, m_bDisguiseWearable );
CNetworkHandle( CBaseEntity, m_hWeaponAssociatedWith );
CUtlVector< const char* > m_HiddenBodyGroups;
#ifdef GAME_DLL
int m_iKillStreak;
#endif // GAME_DLL
#if defined( CLIENT_DLL )
enum eParticleSystemVisibility
{
kParticleSystemVisibility_Undetermined,
kParticleSystemVisibility_Shown,
kParticleSystemVisibility_Hidden,
};
eParticleSystemVisibility m_eParticleSystemVisibility;
short m_nWorldModelIndex;
#endif
};
class CTFWearableVM : public CTFWearable
{
DECLARE_CLASS( CTFWearableVM, CTFWearable );
public:
DECLARE_NETWORKCLASS();
virtual bool IsViewModelWearable( void ) { return true; }
#if defined( CLIENT_DLL )
virtual ShadowType_t ShadowCastType( void );
#endif
};
#endif // TF_WEARABLE_H
|