summaryrefslogtreecommitdiff
path: root/game/server/dod/dod_baserocket.h
blob: 6e1e636985b0d59fe4906a7b08748f2c5321626e (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef DOD_BASEROCKET_H
#define DOD_BASEROCKET_H

#ifdef _WIN32
#pragma once
#endif

#include "cbase.h"
#include "baseanimating.h"
#include "smoke_trail.h"
#include "weapon_dodbase.h"

class RocketTrail;
 
//================================================
// CDODBaseRocket	
//================================================
class CDODBaseRocket : public CBaseAnimating
{
	DECLARE_CLASS( CDODBaseRocket, CBaseAnimating );

public:
	CDODBaseRocket();
	~CDODBaseRocket();
	
	void	Spawn( void );
	void	Precache( void );
	void	RocketTouch( CBaseEntity *pOther );
	void	Explode( void );
	void	Fire( void );
	
	virtual float	GetDamage() { return m_flDamage; }
	virtual void	SetDamage(float flDamage) { m_flDamage = flDamage; }

	unsigned int PhysicsSolidMaskForEntity( void ) const;

	static CDODBaseRocket *Create( const char *szClassname, const Vector &vecOrigin, const QAngle &vecAngles, CBaseEntity *pOwner );	

	void SetupInitialTransmittedGrenadeVelocity( const Vector &velocity );

	virtual DODWeaponID GetEmitterWeaponID() { return WEAPON_NONE; Assert(0); }

protected:
	virtual void DoExplosion( trace_t *pTrace );

	void FlyThink( void );

	float					m_flDamage;

	CNetworkVector( m_vInitialVelocity );

private:
	DECLARE_DATADESC();
	DECLARE_SERVERCLASS();

	float m_flCollideWithTeammatesTime;
	bool m_bCollideWithTeammates;
};

#endif // DOD_BASEROCKET_H