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.

72 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WEAPON_DODFIRESELECT_H
  7. #define WEAPON_DODFIRESELECT_H
  8. #include "cbase.h"
  9. #include "weapon_dodbasegun.h"
  10. #if defined( CLIENT_DLL )
  11. #define CDODFireSelectWeapon C_DODFireSelectWeapon
  12. #include "c_dod_player.h"
  13. #endif
  14. class CDODFireSelectWeapon : public CWeaponDODBaseGun
  15. {
  16. public:
  17. DECLARE_CLASS( CDODFireSelectWeapon, CWeaponDODBaseGun );
  18. DECLARE_NETWORKCLASS();
  19. DECLARE_PREDICTABLE();
  20. CDODFireSelectWeapon();
  21. virtual void Spawn();
  22. virtual void PrimaryAttack( void );
  23. virtual void SecondaryAttack( void );
  24. virtual float GetWeaponAccuracy( float flPlayerSpeed );
  25. virtual float GetFireDelay( void );
  26. virtual void Drop( const Vector &vecVelocity );
  27. bool IsSemiAuto( void );
  28. virtual Activity GetIdleActivity( void );
  29. virtual Activity GetPrimaryAttackActivity( void );
  30. virtual Activity GetReloadActivity( void );
  31. virtual Activity GetDrawActivity( void );
  32. #ifdef CLIENT_DLL
  33. virtual Vector GetDesiredViewModelOffset( C_DODPlayer *pOwner );
  34. void ResetViewModelAnimDir( void )
  35. {
  36. m_bAnimToSemiAuto = true;
  37. m_flPosChangeTimer = 0;
  38. }
  39. virtual void OnWeaponDropped( void )
  40. {
  41. ResetViewModelAnimDir();
  42. m_bSemiAuto = false;
  43. BaseClass::OnWeaponDropped();
  44. }
  45. #endif
  46. private:
  47. CNetworkVar( bool, m_bSemiAuto );
  48. #ifdef CLIENT_DLL
  49. bool m_bAnimToSemiAuto;
  50. float m_flPosChangeTimer;
  51. #endif
  52. private:
  53. CDODFireSelectWeapon( const CDODFireSelectWeapon & );
  54. };
  55. #endif //WEAPON_DODFIRESELECT_H