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.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifdef CLIENT_DLL
  7. #include "c_portal_player.h"
  8. #else
  9. #include "portal_player.h"
  10. #endif
  11. #include "weapon_portalbase.h"
  12. #ifndef WEAPON_BASEPORTALCOMBATWEAPON_SHARED_H
  13. #define WEAPON_BASEPORTALCOMBATWEAPON_SHARED_H
  14. #ifdef _WIN32
  15. #pragma once
  16. #endif
  17. #if defined( CLIENT_DLL )
  18. #define CBasePortalCombatWeapon C_BasePortalCombatWeapon
  19. #endif
  20. class CBasePortalCombatWeapon : public CWeaponPortalBase
  21. {
  22. #if !defined( CLIENT_DLL )
  23. DECLARE_DATADESC();
  24. #endif
  25. DECLARE_CLASS( CBasePortalCombatWeapon, CWeaponPortalBase );
  26. public:
  27. DECLARE_NETWORKCLASS();
  28. DECLARE_PREDICTABLE();
  29. CBasePortalCombatWeapon();
  30. virtual bool WeaponShouldBeLowered( void );
  31. bool CanLower( void );
  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. protected:
  45. bool m_bLowered; // Whether the viewmodel is raised or lowered
  46. float m_flRaiseTime; // If lowered, the time we should raise the viewmodel
  47. float m_flHolsterTime; // When the weapon was holstered
  48. private:
  49. CBasePortalCombatWeapon( const CBasePortalCombatWeapon & );
  50. };
  51. #endif // WEAPON_BASEPORTALCOMBATWEAPON_SHARED_H