blob: 9bd35c02167b4fd17be88dcd8af28a46e05f327f (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: A stationary gun that players can man
//
// $NoKeywords: $
//=============================================================================//
#ifndef TF_OBJ_MANNED_PLASMAGUN_H
#define TF_OBJ_MANNED_PLASMAGUN_H
#ifdef _WIN32
#pragma once
#endif
#include "tf_obj_base_manned_gun.h"
#if defined( CLIENT_DLL )
#define CObjectMannedPlasmagun C_ObjectMannedPlasmagun
#endif
// ------------------------------------------------------------------------ //
// A stationary gun that players can man that's built by the player
// ------------------------------------------------------------------------ //
class CObjectMannedPlasmagun : public CObjectBaseMannedGun
{
public:
#if !defined( CLIENT_DLL )
DECLARE_DATADESC();
#endif
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
DECLARE_CLASS( CObjectMannedPlasmagun, CObjectBaseMannedGun );
static CObjectMannedPlasmagun* Create(const Vector &vOrigin, const QAngle &vAngles);
CObjectMannedPlasmagun();
virtual void Spawn();
virtual void Precache();
virtual void SetupTeamModel( void );
virtual void FinishedBuilding( void );
// All predicted weapons need to implement and return true
virtual bool IsPredicted( void ) const
{
return true;
}
#if defined( CLIENT_DLL )
virtual bool ShouldPredict( void )
{
if ( GetOwner() == C_BasePlayer::GetLocalPlayer() )
return true;
return BaseClass::ShouldPredict();
}
virtual void PreDataUpdate( DataUpdateType_t updateType );
virtual void PostDataUpdate( DataUpdateType_t updateType );
#endif
protected:
// Think function
void RechargeThink();
// Fire the weapon
virtual void Fire( void );
protected:
int m_nMaxAmmoCount;
CNetworkVar( float, m_flNextIdleTime );
// Handling for the multiple barrels
int m_nRightBarrelAttachment;
CNetworkVar( bool, m_bFiringLeft );
private:
CObjectMannedPlasmagun( const CObjectMannedPlasmagun& src );
int m_nPreviousTeam;
};
#endif // TF_OBJ_MANNED_PLASMAGUN_H
|