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.

84 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WEAPON_TFC_MINIGUN_H
  7. #define WEAPON_TFC_MINIGUN_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "weapon_tfcbase.h"
  12. #if defined( CLIENT_DLL )
  13. #define CTFCMinigun C_TFCMinigun
  14. #endif
  15. enum MinigunState_t
  16. {
  17. // assault cannon firing states
  18. AC_STATE_IDLE=0,
  19. AC_STATE_STARTFIRING,
  20. AC_STATE_FIRING,
  21. AC_STATE_SPINNING
  22. };
  23. // ----------------------------------------------------------------------------- //
  24. // CTFCMinigun class definition.
  25. // ----------------------------------------------------------------------------- //
  26. class CTFCMinigun : public CWeaponTFCBase
  27. {
  28. public:
  29. DECLARE_CLASS( CTFCMinigun, CWeaponTFCBase );
  30. DECLARE_NETWORKCLASS();
  31. DECLARE_PREDICTABLE();
  32. #ifndef CLIENT_DLL
  33. DECLARE_DATADESC();
  34. #endif
  35. CTFCMinigun();
  36. // We say yes to this so the weapon system lets us switch to it.
  37. virtual bool HasPrimaryAmmo();
  38. virtual bool CanBeSelected();
  39. virtual void Precache();
  40. virtual void PrimaryAttack();
  41. virtual void WeaponIdle();
  42. virtual bool Deploy();
  43. virtual bool SendWeaponAnim( int iActivity );
  44. virtual void HandleFireOnEmpty();
  45. virtual TFCWeaponID GetWeaponID( void ) const;
  46. // Overrideables.
  47. public:
  48. private:
  49. CTFCMinigun( const CTFCMinigun & ) {}
  50. void WindUp();
  51. void Spin();
  52. void Fire();
  53. void StartSpin();
  54. void WindDown( bool bFromHolster );
  55. private:
  56. MinigunState_t m_iWeaponState;
  57. };
  58. #endif // WEAPON_TFC_MINIGUN_H