blob: 2894b6432006f789b7e3910ef5dab74ee3d963db (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef WEAPON_DODBASEBOMB_H
#define WEAPON_DODBASEBOMB_H
#ifdef _WIN32
#pragma once
#endif
#include "weapon_dodbase.h"
#if defined( CLIENT_DLL )
#define CDODBaseBombWeapon C_DODBaseBombWeapon
#else
#include "dod_bombtarget.h"
#endif
//-----------------------------------------------------------------------------
// RPG
//-----------------------------------------------------------------------------
class CDODBaseBombWeapon : public CWeaponDODBase
{
public:
DECLARE_CLASS( CDODBaseBombWeapon, CWeaponDODBase );
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
DECLARE_ACTTABLE();
CDODBaseBombWeapon();
virtual void Spawn();
virtual void Precache( void );
virtual bool Deploy();
virtual void PrimaryAttack();
virtual void SecondaryAttack();
virtual bool Holster( CBaseCombatWeapon *pSwitchingTo );
virtual void ItemPostFrame( void );
virtual bool CanDrop( void ) { return false; }
virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_NONE; }
virtual bool ShouldDrawCrosshair( void ) { return false; }
virtual bool HasPrimaryAmmo() { return true; }
virtual bool CanBeSelected() { return false; }
#ifndef CLIENT_DLL
void StartPlanting( CDODBombTarget *pTarget );
bool CancelPlanting( void );
void CompletePlant( void );
bool IsLookingAtBombTarget( CBasePlayer *pPlayer, CDODBombTarget *pTarget );
#endif
void SetPlanting( bool bPlanting );
bool IsPlanting( void );
protected:
CDODWeaponInfo *m_pWeaponInfo;
private:
CDODBaseBombWeapon( const CDODBaseBombWeapon & );
bool m_bPlanting;
// pointer to the dod_bomb_target that we're planting at
EHANDLE m_hBombTarget;
// when the plant will be complete
float m_flPlantCompleteTime;
bool m_bUsePlant; // player hit +use to start this plant
float m_flNextPlantCheck;
#ifndef CLIENT_DLL
DECLARE_DATADESC();
#endif
};
#endif // WEAPON_DODBASEBOMB_H
|