aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/hl2/weapon_manhack.cpp
blob: a4d14bffe4058770f61b12607936afe8049d086d (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//
//=============================================================================//


#include "cbase.h"
#include "basehlcombatweapon.h"
#include "player.h"
#include "gamerules.h"
#include "ammodef.h"
#include "in_buttons.h"
#include "bone_setup.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

class CWeapon_Manhack : public CBaseHLCombatWeapon
{
	DECLARE_DATADESC();
public:
	DECLARE_CLASS( CWeapon_Manhack, CBaseHLCombatWeapon );

	DECLARE_SERVERCLASS();

	void			Spawn( void );
	void			Precache( void );

	void			ItemPostFrame( void );
	void			PrimaryAttack( void );
	void			SecondaryAttack( void );

	float			m_flBladeYaw;
};

IMPLEMENT_SERVERCLASS_ST( CWeapon_Manhack, DT_Weapon_Manhack)
END_SEND_TABLE()

LINK_ENTITY_TO_CLASS( weapon_manhack, CWeapon_Manhack );
PRECACHE_WEAPON_REGISTER(weapon_manhack);

//---------------------------------------------------------
// Save/Restore
//---------------------------------------------------------
BEGIN_DATADESC( CWeapon_Manhack )

	DEFINE_FIELD( m_flBladeYaw,			FIELD_FLOAT ),

END_DATADESC()

void CWeapon_Manhack::Spawn( )
{
	// Call base class first
	BaseClass::Spawn();

	Precache( );
	SetModel( GetViewModel() );

	FallInit();// get ready to fall down.

	m_flBladeYaw = NULL;
	AddSolidFlags( FSOLID_NOT_SOLID );
}


//------------------------------------------------------------------------------
// Purpose :
// Input   :
// Output  :
//------------------------------------------------------------------------------
void CWeapon_Manhack::ItemPostFrame( void )
{
	WeaponIdle( );
}

void CWeapon_Manhack::Precache( void )
{
	BaseClass::Precache();
}


//------------------------------------------------------------------------------
// Purpose :
// Input   :
// Output  :
//------------------------------------------------------------------------------
void CWeapon_Manhack::PrimaryAttack()
{
}

//------------------------------------------------------------------------------
// Purpose :
// Input   :
// Output  :
//------------------------------------------------------------------------------
void CWeapon_Manhack::SecondaryAttack()
{
}