summaryrefslogtreecommitdiff
path: root/game/shared/tf/tf_weapon_shovel.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/tf/tf_weapon_shovel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/tf/tf_weapon_shovel.h')
-rw-r--r--game/shared/tf/tf_weapon_shovel.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/game/shared/tf/tf_weapon_shovel.h b/game/shared/tf/tf_weapon_shovel.h
new file mode 100644
index 0000000..85bcf5c
--- /dev/null
+++ b/game/shared/tf/tf_weapon_shovel.h
@@ -0,0 +1,67 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef TF_WEAPON_SHOVEL_H
+#define TF_WEAPON_SHOVEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_weaponbase_melee.h"
+
+#ifdef CLIENT_DLL
+#define CTFShovel C_TFShovel
+#endif
+
+enum shovel_weapontypes_t
+{
+ SHOVEL_STANDARD = 0,
+ SHOVEL_DAMAGE_BOOST,
+ SHOVEL_SPEED_BOOST,
+};
+
+//=============================================================================
+//
+// Shovel class.
+//
+class CTFShovel : public CTFWeaponBaseMelee
+{
+public:
+
+ DECLARE_CLASS( CTFShovel, CTFWeaponBaseMelee );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ CTFShovel();
+ virtual int GetWeaponID( void ) const { return TF_WEAPON_SHOVEL; }
+ virtual void PrimaryAttack();
+
+ int GetShovelType( void ) { int iMode = 0; CALL_ATTRIB_HOOK_INT( iMode, set_weapon_mode ); return iMode; };
+ virtual bool HasDamageBoost( void ) { return (GetShovelType() == SHOVEL_DAMAGE_BOOST); }
+ virtual bool HasSpeedBoost( void ) { return (GetShovelType() == SHOVEL_SPEED_BOOST); }
+ virtual void ItemPreFrame( void ) OVERRIDE;
+ virtual float GetMeleeDamage( CBaseEntity *pTarget, int* piDamageType, int* piCustomDamage );
+ virtual float GetSpeedMod( void );
+
+ void MoveSpeedThink( void );
+
+ virtual bool Deploy( void );
+ virtual bool Holster( CBaseCombatWeapon *pSwitchingTo );
+
+#ifndef CLIENT_DLL
+ virtual float GetForceScale( void );
+ virtual int GetDamageCustom();
+#endif
+
+private:
+
+ CTFShovel( const CTFShovel & ) {}
+
+ bool m_bHolstering;
+ float m_flLastHealthRatio;
+};
+
+#endif // TF_WEAPON_SHOVEL_H