summaryrefslogtreecommitdiff
path: root/game/server/basebludgeonweapon.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/server/basebludgeonweapon.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/basebludgeonweapon.h')
-rw-r--r--game/server/basebludgeonweapon.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/game/server/basebludgeonweapon.h b/game/server/basebludgeonweapon.h
new file mode 100644
index 0000000..6f2a7ea
--- /dev/null
+++ b/game/server/basebludgeonweapon.h
@@ -0,0 +1,57 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: The class from which all bludgeon melee
+// weapons are derived.
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//=============================================================================//
+
+#include "basehlcombatweapon.h"
+
+#ifndef BASEBLUDGEONWEAPON_H
+#define BASEBLUDGEONWEAPON_H
+
+//=========================================================
+// CBaseHLBludgeonWeapon
+//=========================================================
+class CBaseHLBludgeonWeapon : public CBaseHLCombatWeapon
+{
+ DECLARE_CLASS( CBaseHLBludgeonWeapon, CBaseHLCombatWeapon );
+public:
+ CBaseHLBludgeonWeapon();
+
+ DECLARE_SERVERCLASS();
+
+ virtual void Spawn( void );
+ virtual void Precache( void );
+
+ //Attack functions
+ virtual void PrimaryAttack( void );
+ virtual void SecondaryAttack( void );
+
+ virtual void ItemPostFrame( void );
+
+ //Functions to select animation sequences
+ virtual Activity GetPrimaryAttackActivity( void ) { return ACT_VM_HITCENTER; }
+ virtual Activity GetSecondaryAttackActivity( void ) { return ACT_VM_HITCENTER2; }
+
+ virtual float GetFireRate( void ) { return 0.2f; }
+ virtual float GetRange( void ) { return 32.0f; }
+ virtual float GetDamageForActivity( Activity hitActivity ) { return 1.0f; }
+
+ virtual int CapabilitiesGet( void );
+ virtual int WeaponMeleeAttack1Condition( float flDot, float flDist );
+
+protected:
+ virtual void ImpactEffect( trace_t &trace );
+
+private:
+ bool ImpactWater( const Vector &start, const Vector &end );
+ void Swing( int bIsSecondary );
+ void Hit( trace_t &traceHit, Activity nHitActivity, bool bIsSecondary );
+ Activity ChooseIntersectionPointAndActivity( trace_t &hitTrace, const Vector &mins, const Vector &maxs, CBasePlayer *pOwner );
+};
+
+#endif \ No newline at end of file