summaryrefslogtreecommitdiff
path: root/game/shared/tfc/weapon_tfc_minigun.h
blob: cead9d27edf049ed800c54305d4a275cd7b7e4e0 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

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


#include "weapon_tfcbase.h"


#if defined( CLIENT_DLL )

	#define CTFCMinigun C_TFCMinigun

#endif


enum MinigunState_t
{
// assault cannon firing states
	AC_STATE_IDLE=0,
	AC_STATE_STARTFIRING,
	AC_STATE_FIRING,
	AC_STATE_SPINNING
};

// ----------------------------------------------------------------------------- //
// CTFCMinigun class definition.
// ----------------------------------------------------------------------------- //

class CTFCMinigun : public CWeaponTFCBase
{
public:
	DECLARE_CLASS( CTFCMinigun, CWeaponTFCBase );
	DECLARE_NETWORKCLASS(); 
	DECLARE_PREDICTABLE();
	
	#ifndef CLIENT_DLL
		DECLARE_DATADESC();
	#endif

	
	CTFCMinigun();

	// We say yes to this so the weapon system lets us switch to it.
	virtual bool HasPrimaryAmmo();
	virtual bool CanBeSelected();
	virtual void Precache();
	virtual void PrimaryAttack();
	virtual void WeaponIdle();
	virtual bool Deploy();
	virtual bool SendWeaponAnim( int iActivity );
	virtual void HandleFireOnEmpty();
	
	virtual TFCWeaponID GetWeaponID( void ) const;


// Overrideables.
public:

private:
	
	CTFCMinigun( const CTFCMinigun & ) {}

	void WindUp();
	void Spin();
	void Fire();
	void StartSpin();
	void WindDown( bool bFromHolster );


private:

	MinigunState_t m_iWeaponState;
};


#endif // WEAPON_TFC_MINIGUN_H