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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: TF Gas Grenade.
//
//=============================================================================//
#ifndef TF_WEAPON_GRENADE_GAS_H
#define TF_WEAPON_GRENADE_GAS_H
#ifdef _WIN32
#pragma once
#endif
#include "tf_weaponbase_grenade.h"
#include "tf_weaponbase_grenadeproj.h"
// Client specific.
#ifdef CLIENT_DLL
#define CTFGrenadeGas C_TFGrenadeGas
#endif
//=============================================================================
//
// TF Gas Grenade
//
class CTFGrenadeGas : public CTFWeaponBaseGrenade
{
public:
DECLARE_CLASS( CTFGrenadeGas, CTFWeaponBaseGrenade );
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
// DECLARE_ACTTABLE();
CTFGrenadeGas() {}
// Unique identifier.
virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_GAS; }
// Server specific.
#ifdef GAME_DLL
DECLARE_DATADESC();
virtual CTFWeaponBaseGrenadeProj *EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flTime, int iflags = 0 );
#endif
CTFGrenadeGas( const CTFGrenadeGas & ) {}
};
#ifdef CLIENT_DLL
#define CTFGasGrenadeEffect C_TFGasGrenadeEffect
#endif
class CTFGasGrenadeEffect : public CBaseEntity
{
public:
DECLARE_CLASS( CTFGasGrenadeEffect, CBaseEntity );
DECLARE_NETWORKCLASS();
#ifndef CLIENT_DLL
virtual int UpdateTransmitState( void );
#else
CTFGasGrenadeEffect()
{
m_pGasEffect = NULL;
}
virtual void OnDataChanged( DataUpdateType_t updateType );
CNewParticleEffect *m_pGasEffect;
#endif
};
//=============================================================================
//
// TF Gase Grenade Projectile (Server specific.)
//
#ifdef GAME_DLL
class CTFGrenadeGasProjectile : public CTFWeaponBaseGrenadeProj
{
public:
DECLARE_CLASS( CTFGrenadeGasProjectile, CTFWeaponBaseGrenadeProj );
DECLARE_DATADESC();
~CTFGrenadeGasProjectile();
// Unique identifier.
virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_GAS; }
// Creation.
static CTFGrenadeGasProjectile *Create( const Vector &position, const QAngle &angles, const Vector &velocity,
const AngularImpulse &angVelocity, CBaseCombatCharacter *pOwner, const CTFWeaponInfo &weaponInfo, float timer, int iFlags = 0 );
// Overrides.
virtual void Spawn();
virtual void Precache();
virtual void BounceSound( void );
virtual void Detonate();
virtual void DetonateThink( void );
void Think_Emit( void );
void Think_Fade( void );
private:
int m_nPulses;
CHandle<CTFGasGrenadeEffect> m_hGasEffect;
};
#endif
#endif // TF_WEAPON_GRENADE_GAS_H
|