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.

88 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WEAPON_TFC_CROWBAR_H
  7. #define WEAPON_TFC_CROWBAR_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "weapon_tfcbase.h"
  12. #if defined( CLIENT_DLL )
  13. #define CTFCCrowbar C_TFCCrowbar
  14. #endif
  15. // ----------------------------------------------------------------------------- //
  16. // CTFCCrowbar class definition.
  17. // ----------------------------------------------------------------------------- //
  18. class CTFCCrowbar : public CWeaponTFCBase
  19. {
  20. public:
  21. DECLARE_CLASS( CTFCCrowbar, CWeaponTFCBase );
  22. DECLARE_NETWORKCLASS();
  23. DECLARE_PREDICTABLE();
  24. #ifndef CLIENT_DLL
  25. DECLARE_DATADESC();
  26. #endif
  27. CTFCCrowbar();
  28. // We say yes to this so the weapon system lets us switch to it.
  29. virtual bool HasPrimaryAmmo();
  30. virtual bool CanBeSelected();
  31. virtual void ItemPostFrame();
  32. virtual void Precache();
  33. void Spawn();
  34. void Smack();
  35. void PrimaryAttack();
  36. bool Deploy();
  37. void Holster( int skiplocal = 0 );
  38. bool CanDrop();
  39. void WeaponIdle();
  40. virtual TFCWeaponID GetWeaponID( void ) const;
  41. // Overrideables.
  42. public:
  43. #ifdef GAME_DLL
  44. // This is called first to determine if the axe should apply damage to the entity.
  45. virtual void AxeHit(
  46. CBaseEntity *pHit,
  47. bool bFirstSwing,
  48. trace_t &tr,
  49. float *flDamage,
  50. bool *bDoEffects
  51. );
  52. #endif
  53. public:
  54. trace_t m_trHit;
  55. EHANDLE m_pTraceHitEnt;
  56. float m_flStoredPrimaryAttack;
  57. private:
  58. CTFCCrowbar( const CTFCCrowbar & ) {}
  59. };
  60. #endif // WEAPON_TFC_CROWBAR_H