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.

87 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef WEAPON_DODBASERPG_H
  8. #define WEAPON_DODBASERPG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "weapon_dodbase.h"
  13. #if defined( CLIENT_DLL )
  14. #define CDODBaseRocketWeapon C_DODBaseRocketWeapon
  15. #endif
  16. //-----------------------------------------------------------------------------
  17. // RPG
  18. //-----------------------------------------------------------------------------
  19. class CDODBaseRocketWeapon : public CWeaponDODBase
  20. {
  21. public:
  22. DECLARE_CLASS( CDODBaseRocketWeapon, CWeaponDODBase );
  23. DECLARE_NETWORKCLASS();
  24. DECLARE_PREDICTABLE();
  25. CDODBaseRocketWeapon();
  26. virtual void Spawn();
  27. virtual void PrimaryAttack();
  28. virtual void SecondaryAttack();
  29. virtual bool Deploy();
  30. virtual bool CanHolster();
  31. virtual bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
  32. virtual bool Reload();
  33. virtual void WeaponIdle();
  34. virtual void Drop( const Vector &vecVelocity );
  35. virtual bool CanDrop( void ) { return ( IsDeployed() == false ); }
  36. void DoFireEffects();
  37. void Precache( void );
  38. void Raise();
  39. bool Lower();
  40. virtual Activity GetDrawActivity( void );
  41. virtual Activity GetIdleActivity( void );
  42. virtual Activity GetLowerActivity( void );
  43. virtual Activity GetRaiseActivity( void );
  44. virtual void FireRocket( void );
  45. inline bool IsDeployed() { return m_bDeployed; }
  46. inline void SetDeployed( bool bDeployed ) { m_bDeployed = bDeployed; }
  47. bool ShouldPlayerBeSlow( void );
  48. virtual bool ShouldAutoEjectBrass( void ) { return false; }
  49. #ifdef CLIENT_DLL
  50. virtual void OverrideMouseInput( float *x, float *y );
  51. #endif
  52. virtual float GetRecoil( void ) { return 10.0f; }
  53. protected:
  54. CNetworkVar( bool, m_bDeployed );
  55. CDODWeaponInfo *m_pWeaponInfo;
  56. private:
  57. CDODBaseRocketWeapon( const CDODBaseRocketWeapon & );
  58. #ifndef CLIENT_DLL
  59. DECLARE_DATADESC();
  60. #endif
  61. };
  62. #endif // WEAPON_DODBASERPG_H