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.

69 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef TF_WEAPON_FISTS_H
  7. #define TF_WEAPON_FISTS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tf_weaponbase_melee.h"
  12. #ifdef CLIENT_DLL
  13. #define CTFFists C_TFFists
  14. #endif
  15. enum fisttypes_t
  16. {
  17. FISTTYPE_BASE = 0,
  18. FISTTYPE_RADIAL_BUFF,
  19. FISTTYPE_GRU,
  20. };
  21. //=============================================================================
  22. //
  23. // Fists weapon class.
  24. //
  25. class CTFFists : public CTFWeaponBaseMelee
  26. {
  27. public:
  28. DECLARE_CLASS( CTFFists, CTFWeaponBaseMelee );
  29. DECLARE_NETWORKCLASS();
  30. DECLARE_PREDICTABLE();
  31. CTFFists() {}
  32. virtual int GetWeaponID( void ) const { return TF_WEAPON_FISTS; }
  33. virtual void ItemPreFrame();
  34. virtual void PrimaryAttack();
  35. virtual void SecondaryAttack();
  36. virtual bool Holster( CBaseCombatWeapon *pSwitchingTo );
  37. virtual void SendPlayerAnimEvent( CTFPlayer *pPlayer );
  38. virtual void DoViewModelAnimation( void );
  39. virtual bool HideWhileStunned( void ) { return false; }
  40. void Punch( void );
  41. #ifdef GAME_DLL
  42. virtual void OnEntityHit( CBaseEntity *pEntity, CTakeDamageInfo *info );
  43. #endif
  44. virtual bool AllowTaunts( void );
  45. int GetFistType( void ) { int iMode = 0; CALL_ATTRIB_HOOK_INT( iMode, set_weapon_mode ); return iMode; };
  46. virtual void SetWeaponVisible( bool visible ){} // intentionally never hiding the fists
  47. private:
  48. CTFFists( const CTFFists & ) {}
  49. };
  50. #endif // TF_WEAPON_FISTS_H