Counter Strike : Global Offensive Source Code
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.

81 lines
2.2 KiB

  1. //========= Copyright � 1996-2005, 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. virtual void ItemPostFrame( void );
  45. protected:
  46. bool m_bLowered; // Whether the viewmodel is raised or lowered
  47. float m_flRaiseTime; // If lowered, the time we should raise the viewmodel
  48. float m_flHolsterTime; // When the weapon was holstered
  49. float m_flNextRepeatPrimaryAttack;
  50. float m_flNextRepeatSecondaryAttack;
  51. private:
  52. CBasePortalCombatWeapon( const CBasePortalCombatWeapon & );
  53. // throwing guns
  54. public:
  55. float GetThrowTime();
  56. bool EnoughTimeSinceThrown();
  57. virtual void Drop( const Vector &vecVelocity );
  58. CBaseEntity* GetLastOwner();
  59. private:
  60. float m_flThrowTime;
  61. CBaseEntity* m_pLastOwner;
  62. };
  63. #endif // WEAPON_BASEPORTALCOMBATWEAPON_SHARED_H