blob: e6e9f65d60c8491a9bf37cbd0bc2bdd201591a5a (
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
83
84
85
86
87
88
89
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef C_TF_PROJECTILE_ARROW_H
#define C_TF_PROJECTILE_ARROW_H
#ifdef _WIN32
#pragma once
#endif
#include "tf_weaponbase_rocket.h"
#define CTFProjectile_Arrow C_TFProjectile_Arrow
//-----------------------------------------------------------------------------
// Purpose: Arrow projectile.
//-----------------------------------------------------------------------------
class C_TFProjectile_Arrow : public C_TFBaseRocket
{
DECLARE_CLASS( C_TFProjectile_Arrow, C_TFBaseRocket );
public:
DECLARE_NETWORKCLASS();
C_TFProjectile_Arrow();
~C_TFProjectile_Arrow();
virtual void OnDataChanged( DataUpdateType_t updateType );
virtual void NotifyBoneAttached( C_BaseAnimating* attachTarget );
virtual void ClientThink( void );
void CheckNearMiss( void );
void CreateCritTrail( void );
void SetLifeTime( float flLifetime ) { m_flLifeTime = flLifetime; }
private:
float m_fAttachTime;
float m_nextNearMissCheck;
bool m_bNearMiss;
bool m_bArrowAlight;
bool m_bCritical;
CNewParticleEffect *m_pCritEffect;
int m_iCachedDeflect;
float m_flLifeTime;
CNetworkVar( int, m_iProjectileType );
};
//-----------------------------------------------------------------------------
// Purpose: Arrow projectile.
//-----------------------------------------------------------------------------
class C_TFProjectile_HealingBolt : public C_TFProjectile_Arrow
{
DECLARE_CLASS( C_TFProjectile_HealingBolt, C_TFProjectile_Arrow );
virtual void OnDataChanged( DataUpdateType_t updateType );
public:
DECLARE_NETWORKCLASS();
};
//-----------------------------------------------------------------------------
// Purpose: Grappling Hook projectile.
//-----------------------------------------------------------------------------
class C_TFProjectile_GrapplingHook : public C_TFProjectile_Arrow
{
DECLARE_CLASS( C_TFProjectile_GrapplingHook, C_TFProjectile_Arrow );
public:
DECLARE_NETWORKCLASS();
virtual void OnDataChanged( DataUpdateType_t updateType );
virtual void UpdateOnRemove();
virtual void ClientThink();
private:
void UpdateRope();
void RemoveRope();
CHandle< C_RopeKeyframe > m_hRope;
};
#endif // C_TF_PROJECTILE_ARROW_H
|