blob: 32bdf8cb9d283b898956216275fc58f2ee513a1e (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Rockets (Weapon)
//
//=============================================================================//
#ifndef WEAPON_GRENADE_ROCKET_H
#define WEAPON_GRENADE_ROCKET_H
#ifdef _WIN32
#pragma once
#endif
#if defined( CLIENT_DLL )
// Client Only
#define CWeaponGrenadeRocket C_WeaponGrenadeRocket
#else
#include "iscorer.h"
#endif
class CWeaponGrenadeRocket: public CBaseAnimating
#if !defined( CLIENT_DLL )
, public IScorer
#endif
{
DECLARE_CLASS( CWeaponGrenadeRocket, CBaseAnimating );
public:
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
CWeaponGrenadeRocket();
~CWeaponGrenadeRocket();
void Spawn( void );
void SetRealOwner( CBasePlayer *pOwner ) { m_hOwner = pOwner; }
float GetDamage( void ) { return m_flDamage; }
void SetDamage( float flDamage ) { m_flDamage = flDamage; }
int GetDamageType() const { return DMG_BLAST; }
float GetDamageRadius( void ) { return m_flRadius; }
void SetDamageRadius( float flRadius ) { m_flRadius = flRadius; }
void SetMaxRange( float flRange );
void RocketTouch( CBaseEntity *pOther );
static CWeaponGrenadeRocket *Create( const Vector &vecOrigin, const Vector &vecAngles, float flMaxRange, CBaseEntity *pRealOwner );
#if !defined( CLIENT_DLL )
// Server Only
void Precache( void );
void SetAnglesToMatchVelocity( void );
void ExceededRangeThink( void );
void TrackThink( void );
void ApplyForcesToVehicle( CBaseEntity *pEntity );
// IScorer
public:
// Return the entity that should receive the score
virtual CBasePlayer *GetScorer( void );
// Return the entity that should get assistance credit
virtual CBasePlayer *GetAssistant( void ) { return NULL; };
#else
// Client Only
void OnDataChanged( DataUpdateType_t updateType );
void ClientThink( void );
#endif
private:
CWeaponGrenadeRocket( const CWeaponGrenadeRocket& );
private:
float m_flDamage;
float m_flRadius;
float m_flMaxRange;
float m_flFallingSpeed;
float m_flExceedRangeTime;
EHANDLE m_hOwner;
};
#endif // WEAPON_GRENADE_ROCKET_H
|