blob: 18b77382ed110127d1ce1fe6b623611a5546d63c (
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. ============//
//
// TF Rocket Projectile
//
//=============================================================================
#ifndef TF_PROJECTILE_ROCKET_H
#define TF_PROJECTILE_ROCKET_H
#ifdef _WIN32
#pragma once
#endif
#include "tf_weaponbase_rocket.h"
#include "iscorer.h"
//=============================================================================
//
// Generic rocket.
//
class CTFProjectile_Rocket : public CTFBaseRocket, public IScorer
{
public:
DECLARE_CLASS( CTFProjectile_Rocket, CTFBaseRocket );
DECLARE_NETWORKCLASS();
// Creation.
static CTFProjectile_Rocket *Create( CBaseEntity *pLauncher, const Vector &vecOrigin, const QAngle &vecAngles, CBaseEntity *pOwner = NULL, CBaseEntity *pScorer = NULL );
virtual void Spawn();
virtual void Precache();
virtual void RocketTouch( CBaseEntity *pOther ) OVERRIDE;
// IScorer interface
virtual CBasePlayer *GetScorer( void );
virtual CBasePlayer *GetAssistant( void ) { return NULL; }
void SetScorer( CBaseEntity *pScorer );
void SetCritical( bool bCritical ) { m_bCritical = bCritical; }
bool IsCritical() { return m_bCritical; }
virtual int GetDamageType();
virtual int GetDamageCustom();
virtual bool IsDeflectable() { return true; }
virtual void Deflected( CBaseEntity *pDeflectedBy, Vector &vecDir );
void SetDirectHit( bool bDirectHit ){ m_bDirectHit = bDirectHit; }
virtual int GetWeaponID( void ) const { return ( m_bDirectHit ? TF_WEAPON_ROCKETLAUNCHER_DIRECTHIT : TF_WEAPON_ROCKETLAUNCHER ); }
void SetEyeBallRocket( bool state ){ m_bEyeBallRocket = state; }
void SetSpell( bool bSpell ) { m_bSpell = bSpell; }
private:
CBaseHandle m_Scorer;
CNetworkVar( bool, m_bCritical );
bool m_bDirectHit;
bool m_bEyeBallRocket;
bool m_bSpell;
};
#endif //TF_PROJECTILE_ROCKET_H
|