Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WEAPON_STUNSTICK_H
  7. #define WEAPON_STUNSTICK_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "basebludgeonweapon.h"
  12. #define STUNSTICK_RANGE 75.0f
  13. #define STUNSTICK_REFIRE 0.6f
  14. class CWeaponStunStick : public CBaseHLBludgeonWeapon
  15. {
  16. DECLARE_CLASS( CWeaponStunStick, CBaseHLBludgeonWeapon );
  17. DECLARE_DATADESC();
  18. public:
  19. CWeaponStunStick();
  20. DECLARE_SERVERCLASS();
  21. DECLARE_ACTTABLE();
  22. virtual void Precache();
  23. void Spawn();
  24. float GetRange( void ) { return STUNSTICK_RANGE; }
  25. float GetFireRate( void ) { return STUNSTICK_REFIRE; }
  26. int WeaponMeleeAttack1Condition( float flDot, float flDist );
  27. bool Deploy( void );
  28. bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
  29. void Drop( const Vector &vecVelocity );
  30. void ImpactEffect( trace_t &traceHit );
  31. void SecondaryAttack( void ) {}
  32. void SetStunState( bool state );
  33. bool GetStunState( void );
  34. void Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator );
  35. float GetDamageForActivity( Activity hitActivity );
  36. bool CanBePickedUpByNPCs( void ) { return false; }
  37. private:
  38. CNetworkVar( bool, m_bActive );
  39. };
  40. #endif // WEAPON_STUNSTICK_H