blob: e2c268312a75cf8cf10020b4961603793cfba5f1 (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//
//=============================================================================
#ifndef TF_WEAPON_SMG_H
#define TF_WEAPON_SMG_H
#ifdef _WIN32
#pragma once
#endif
#include "tf_weaponbase_gun.h"
// Client specific.
#ifdef CLIENT_DLL
#define CTFSMG C_TFSMG
#define CTFChargedSMG C_TFChargedSMG
#endif
//=============================================================================
//
// TF Weapon Sub-machine gun.
//
class CTFSMG : public CTFWeaponBaseGun
{
public:
DECLARE_CLASS( CTFSMG, CTFWeaponBaseGun );
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
// Server specific.
#ifdef GAME_DLL
DECLARE_DATADESC();
#endif
CTFSMG() {}
~CTFSMG() {}
virtual int GetWeaponID( void ) const { return TF_WEAPON_SMG; }
virtual int GetDamageType( void ) const;
virtual bool CanFireCriticalShot( bool bIsHeadshot );
bool CanHeadshot( void ) const { int iMode = 0; CALL_ATTRIB_HOOK_INT( iMode, set_weapon_mode ); return (iMode == 1); };
private:
CTFSMG( const CTFSMG & ) {}
};
//=============================================================================
//
// TF Weapon Charged Sub-machine gun.
//
class CTFChargedSMG : public CTFSMG
{
public:
DECLARE_CLASS( CTFChargedSMG, CTFSMG );
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
// Server specific.
#ifdef GAME_DLL
DECLARE_DATADESC();
#endif
CTFChargedSMG() {}
~CTFChargedSMG() {}
virtual int GetWeaponID( void ) const { return TF_WEAPON_CHARGED_SMG; }
const char* GetEffectLabelText( void ) { return "#TF_SmgCharge"; }
float GetProgress( void );
bool ShouldFlashChargeBar();
void SecondaryAttack() OVERRIDE;
bool CanPerformSecondaryAttack() const OVERRIDE;
void WeaponReset() OVERRIDE;
#ifdef GAME_DLL
void ApplyOnHitAttributes( CBaseEntity *pVictimBaseEntity, CTFPlayer *pAttacker, const CTakeDamageInfo &info ) OVERRIDE;
#endif
protected:
CNetworkVar( float, m_flMinicritCharge );
float m_flMinicritStartTime;
private:
CTFChargedSMG( const CTFChargedSMG & ) {}
};
#endif // TF_WEAPON_SMG_H
|