forked from FWGS/hlsdk-portable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lightning_gun.h
executable file
·63 lines (47 loc) · 1.13 KB
/
lightning_gun.h
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
#ifndef LIGHTNING_GUN_H
#define LIGHTNING_GUN_H
// undefined in original mod code?
#define LIGHTNING_GUN_MAX_BEAMS 2
class CLightningGun : public CBasePlayerWeapon
{
public:
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
void Spawn( void );
void Precache( void );
int iItemSlot( void ) { return 3; }
int GetItemInfo(ItemInfo *p);
int AddToPlayer( CBasePlayer *pPlayer );
BOOL Deploy( void );
void Holster( int skiplocal = 0 );
void PrimaryAttack( void );
void SecondaryAttack( void );
void WeaponIdle( void );
void ZapPowerUp( void );
void ZapShoot( void );
void ZapDone( void );
int m_fInAttack;
int m_iBeams;
void ClearBeams( void );
void ZapBeam( int side );
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
return TRUE;
#else
return FALSE;
#endif
}
private:
// the beam effect
CBeam* m_pBeam[LIGHTNING_GUN_MAX_BEAMS];
};
////////////////////////////////////////////////////////////////////////////
class CLightningGunAmmo : public CBasePlayerAmmo
{
void Spawn( void );
void Precache( void );
BOOL AddAmmo( CBaseEntity *pOther );
};
#endif