aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/hl2/weapon_tripwire.h
blob: 9ecde01d6669d3e9f208955d06c94bbb60bcbe5c (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:		TRIPWIRE 
//
// $Workfile:     $
// $Date:         $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//

#ifndef	WEAPONTRIPWIRE_H
#define	WEAPONTRIPWIRE_H

#include "basegrenade_shared.h"
#include "basehlcombatweapon.h"

enum TripwireState_t
{
	TRIPWIRE_TRIPMINE_READY,
	TRIPWIRE_SATCHEL_THROW,
	TRIPWIRE_SATCHEL_ATTACH,
};

class CWeapon_Tripwire : public CBaseHLCombatWeapon
{
public:
	DECLARE_CLASS( CWeapon_Tripwire, CBaseHLCombatWeapon );

	DECLARE_SERVERCLASS();

	bool				m_bNeedReload;
	bool				m_bClearReload;
	bool				m_bAttachTripwire;

	void				Spawn( void );
	void				Precache( void );

	int					CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
	void				PrimaryAttack( void );
	void				SecondaryAttack( void );
	void				WeaponIdle( void );
	void				WeaponSwitch( void );
	
	void				SetPickupTouch( void );
	void				TripwireTouch( CBaseEntity *pOther );	// default weapon touch
	void				ItemPostFrame( void );	
	bool				Reload( void );
	bool				CanAttachTripwire(void);		// In position where can attach TRIPWIRE?
	void				StartTripwireAttach( void );
	void				TripwireAttach( void );

	bool				Deploy( void );
	bool				Holster( CBaseCombatWeapon *pSwitchingTo = NULL );


	CWeapon_Tripwire();

	DECLARE_ACTTABLE();
	DECLARE_DATADESC();
};


#endif	//WEAPONTRIPWIRE_H