aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/hl2/grenade_pathfollower.h
blob: 5b2247b3f14285c5206289e08a6036e66e322aeb (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:		Projectile shot by wasteland scanner 
//
// $Workfile:     $
// $Date:         $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//

#ifndef	GRENADEPATHFOLLOWER_H
#define	GRENADEPATHFOLLOWER_H

#include "basegrenade_shared.h"

class RocketTrail;

class CGrenadePathfollower : public CBaseGrenade
{
public:
	DECLARE_CLASS( CGrenadePathfollower, CBaseGrenade );

	static CGrenadePathfollower* CreateGrenadePathfollower( string_t sModelName, string_t sFlySound, const Vector &vecOrigin, const QAngle &vecAngles, edict_t *pentOwner );

	CHandle<RocketTrail>	m_hRocketTrail;
	CBaseEntity*	m_pPathTarget;				// path corner we are heading towards
	float			m_flFlySpeed;
	string_t		m_sFlySound;
	float			m_flNextFlySoundTime;

	Class_T			Classify( void);
	void			Spawn( void );
	void			AimThink( void );
	void 			GrenadeTouch( CBaseEntity *pOther );
	void			Event_Killed( const CTakeDamageInfo &info );
	void			Launch( float flLaunchSpeed, string_t sPathCornerName);
	void			PlayFlySound(void);

	void EXPORT		Detonate(void);

	CGrenadePathfollower(void);
	~CGrenadePathfollower(void);

	virtual void Precache();

	DECLARE_DATADESC();
};

#endif	//GRENADEPATHFOLLOWER_H