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.

66 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "basecombatweapon_shared.h"
  7. #ifndef BASEHLCOMBATWEAPON_SHARED_H
  8. #define BASEHLCOMBATWEAPON_SHARED_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #if defined( CLIENT_DLL )
  13. #define CBaseHLCombatWeapon C_BaseHLCombatWeapon
  14. #endif
  15. class CBaseHLCombatWeapon : public CBaseCombatWeapon
  16. {
  17. #if !defined( CLIENT_DLL )
  18. #ifndef _XBOX
  19. DECLARE_DATADESC();
  20. #else
  21. protected:
  22. DECLARE_DATADESC();
  23. private:
  24. #endif
  25. #endif
  26. DECLARE_CLASS( CBaseHLCombatWeapon, CBaseCombatWeapon );
  27. public:
  28. DECLARE_NETWORKCLASS();
  29. DECLARE_PREDICTABLE();
  30. virtual bool WeaponShouldBeLowered( void );
  31. bool CanLower();
  32. virtual bool Ready( void );
  33. virtual bool Lower( void );
  34. virtual bool Deploy( void );
  35. virtual bool Holster( CBaseCombatWeapon *pSwitchingTo );
  36. virtual void WeaponIdle( void );
  37. virtual void AddViewmodelBob( CBaseViewModel *viewmodel, Vector &origin, QAngle &angles );
  38. virtual float CalcViewmodelBob( void );
  39. virtual Vector GetBulletSpread( WeaponProficiency_t proficiency );
  40. virtual float GetSpreadBias( WeaponProficiency_t proficiency );
  41. virtual const WeaponProficiencyInfo_t *GetProficiencyValues();
  42. static const WeaponProficiencyInfo_t *GetDefaultProficiencyValues();
  43. virtual void ItemHolsterFrame( void );
  44. int m_iPrimaryAttacks; // # of primary attacks performed with this weapon
  45. int m_iSecondaryAttacks; // # of secondary attacks performed with this weapon
  46. protected:
  47. bool m_bLowered; // Whether the viewmodel is raised or lowered
  48. float m_flRaiseTime; // If lowered, the time we should raise the viewmodel
  49. float m_flHolsterTime; // When the weapon was holstered
  50. };
  51. #endif // BASEHLCOMBATWEAPON_SHARED_H