summaryrefslogtreecommitdiff
path: root/game/server/hl2/weapon_stunstick.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/hl2/weapon_stunstick.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/hl2/weapon_stunstick.h')
-rw-r--r--game/server/hl2/weapon_stunstick.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/game/server/hl2/weapon_stunstick.h b/game/server/hl2/weapon_stunstick.h
new file mode 100644
index 0000000..901b472
--- /dev/null
+++ b/game/server/hl2/weapon_stunstick.h
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef WEAPON_STUNSTICK_H
+#define WEAPON_STUNSTICK_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "basebludgeonweapon.h"
+
+#define STUNSTICK_RANGE 75.0f
+#define STUNSTICK_REFIRE 0.6f
+
+class CWeaponStunStick : public CBaseHLBludgeonWeapon
+{
+ DECLARE_CLASS( CWeaponStunStick, CBaseHLBludgeonWeapon );
+ DECLARE_DATADESC();
+
+public:
+
+ CWeaponStunStick();
+
+ DECLARE_SERVERCLASS();
+ DECLARE_ACTTABLE();
+
+ virtual void Precache();
+
+ void Spawn();
+
+ float GetRange( void ) { return STUNSTICK_RANGE; }
+ float GetFireRate( void ) { return STUNSTICK_REFIRE; }
+
+ int WeaponMeleeAttack1Condition( float flDot, float flDist );
+
+ bool Deploy( void );
+ bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
+
+ void Drop( const Vector &vecVelocity );
+ void ImpactEffect( trace_t &traceHit );
+ void SecondaryAttack( void ) {}
+ void SetStunState( bool state );
+ bool GetStunState( void );
+ void Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator );
+
+ float GetDamageForActivity( Activity hitActivity );
+
+ bool CanBePickedUpByNPCs( void ) { return false; }
+
+private:
+
+ CNetworkVar( bool, m_bActive );
+};
+
+#endif // WEAPON_STUNSTICK_H