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.

63 lines
1.6 KiB

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