summaryrefslogtreecommitdiff
path: root/game/shared/dod/weapon_dodbaserpg.h
blob: 0b570c78376c41757f4b9e8536ecdd4df47c8a90 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef WEAPON_DODBASERPG_H
#define WEAPON_DODBASERPG_H

#ifdef _WIN32
#pragma once
#endif

#include "weapon_dodbase.h"
 

#if defined( CLIENT_DLL )

	#define CDODBaseRocketWeapon C_DODBaseRocketWeapon

#endif

//-----------------------------------------------------------------------------
// RPG
//-----------------------------------------------------------------------------
class CDODBaseRocketWeapon : public CWeaponDODBase
{
public:
	DECLARE_CLASS( CDODBaseRocketWeapon, CWeaponDODBase );
	DECLARE_NETWORKCLASS(); 
	DECLARE_PREDICTABLE();
	
	CDODBaseRocketWeapon();

	virtual void Spawn();
	virtual void PrimaryAttack();
	virtual void SecondaryAttack();
	virtual bool Deploy();
	virtual bool CanHolster();
	virtual bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
	virtual bool Reload();
	virtual void WeaponIdle();
	virtual void Drop( const Vector &vecVelocity );

	virtual bool CanDrop( void ) { return ( IsDeployed() == false ); }

	void		DoFireEffects();

	void		Precache( void );

	void		Raise();
	bool		Lower();

	virtual Activity GetDrawActivity( void );
	virtual Activity GetIdleActivity( void );
	virtual Activity GetLowerActivity( void );
	virtual Activity GetRaiseActivity( void );

	virtual	void FireRocket( void );

	inline bool IsDeployed() { return m_bDeployed; }
	inline void SetDeployed( bool bDeployed ) { m_bDeployed = bDeployed; }
	
	bool		ShouldPlayerBeSlow( void );

	virtual bool ShouldAutoEjectBrass( void ) { return false; }

#ifdef CLIENT_DLL
	virtual void OverrideMouseInput( float *x, float *y );
#endif

	virtual float GetRecoil( void ) { return 10.0f; }

protected:
	CNetworkVar( bool, m_bDeployed );

	CDODWeaponInfo *m_pWeaponInfo;

private:
	CDODBaseRocketWeapon( const CDODBaseRocketWeapon & );
	
#ifndef CLIENT_DLL
	DECLARE_DATADESC();
#endif
};

#endif // WEAPON_DODBASERPG_H