diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/shared/hl2mp/weapon_hl2mpbasebasebludgeon.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/shared/hl2mp/weapon_hl2mpbasebasebludgeon.h')
| -rw-r--r-- | mp/src/game/shared/hl2mp/weapon_hl2mpbasebasebludgeon.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/mp/src/game/shared/hl2mp/weapon_hl2mpbasebasebludgeon.h b/mp/src/game/shared/hl2mp/weapon_hl2mpbasebasebludgeon.h new file mode 100644 index 00000000..df5ef041 --- /dev/null +++ b/mp/src/game/shared/hl2mp/weapon_hl2mpbasebasebludgeon.h @@ -0,0 +1,66 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: The class from which all bludgeon melee
+// weapons are derived.
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//=============================================================================//
+
+#include "weapon_hl2mpbasehlmpcombatweapon.h"
+
+#ifndef BASEBLUDGEONWEAPON_H
+#define BASEBLUDGEONWEAPON_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#if defined( CLIENT_DLL )
+#define CBaseHL2MPBludgeonWeapon C_BaseHL2MPBludgeonWeapon
+#endif
+
+//=========================================================
+// CBaseHLBludgeonWeapon
+//=========================================================
+class CBaseHL2MPBludgeonWeapon : public CBaseHL2MPCombatWeapon
+{
+ DECLARE_CLASS( CBaseHL2MPBludgeonWeapon, CBaseHL2MPCombatWeapon );
+public:
+ CBaseHL2MPBludgeonWeapon();
+
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ 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; }
+
+ CBaseHL2MPBludgeonWeapon( const CBaseHL2MPBludgeonWeapon & );
+
+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 );
+ Activity ChooseIntersectionPointAndActivity( trace_t &hitTrace, const Vector &mins, const Vector &maxs, CBasePlayer *pOwner );
+};
+
+#endif
\ No newline at end of file |