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

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

#define ROCKET_VELOCITY			1000

//====================================================================================
// Purpose: ROCKET LAUNCHER SENTRYGUN'S ROCKETS
//====================================================================================
class CGrenadeRocket : public CBaseAnimating
{
	DECLARE_CLASS( CGrenadeRocket, CBaseAnimating );
public:

	DECLARE_DATADESC();
	DECLARE_SERVERCLASS();

	CGrenadeRocket();

	void Spawn( void );
	void Precache( void );
	void MissileTouch( CBaseEntity *pOther );
	void LockOnto( CBaseEntity *pTarget );
	void FollowThink( void );

	// Damage accessors.
	virtual float GetDamage(void)
	{
		return m_flDamage;
	}
	
	virtual void SetDamage(float flDamage)
	{
		m_flDamage = flDamage;
	}

	virtual int GetDamageType() const
	{
		return DMG_BLAST;
	}

	static CGrenadeRocket *CGrenadeRocket::Create( const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner, CBaseEntity *pRealOwner );

public:
	EHANDLE		m_hLockTarget;
	EHANDLE		m_hOwner;
	EHANDLE		m_pRealOwner;
	float		m_flDamage;
};

#endif // GRENADE_ROCKET_H