diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/hl2/weapon_manhack.cpp | |
| download | archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip | |
Diffstat (limited to 'game/server/hl2/weapon_manhack.cpp')
| -rw-r--r-- | game/server/hl2/weapon_manhack.cpp | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/game/server/hl2/weapon_manhack.cpp b/game/server/hl2/weapon_manhack.cpp new file mode 100644 index 0000000..a4d14bf --- /dev/null +++ b/game/server/hl2/weapon_manhack.cpp @@ -0,0 +1,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() +{ +} + + + |