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.

60 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WEAPON_ALYXGUN_H
  7. #define WEAPON_ALYXGUN_H
  8. #include "basehlcombatweapon.h"
  9. #if defined( _WIN32 )
  10. #pragma once
  11. #endif
  12. class CWeaponAlyxGun : public CHLSelectFireMachineGun
  13. {
  14. DECLARE_DATADESC();
  15. public:
  16. DECLARE_CLASS( CWeaponAlyxGun, CHLSelectFireMachineGun );
  17. CWeaponAlyxGun();
  18. ~CWeaponAlyxGun();
  19. DECLARE_SERVERCLASS();
  20. void Precache( void );
  21. virtual int GetMinBurst( void ) { return 4; }
  22. virtual int GetMaxBurst( void ) { return 7; }
  23. virtual float GetMinRestTime( void );
  24. virtual float GetMaxRestTime( void );
  25. virtual void Equip( CBaseCombatCharacter *pOwner );
  26. float GetFireRate( void ) { return 0.1f; }
  27. int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
  28. int WeaponRangeAttack1Condition( float flDot, float flDist );
  29. int WeaponRangeAttack2Condition( float flDot, float flDist );
  30. virtual const Vector& GetBulletSpread( void );
  31. void FireNPCPrimaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles );
  32. void Operator_ForceNPCFire( CBaseCombatCharacter *pOperator, bool bSecondary );
  33. void Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator );
  34. virtual void SetPickupTouch( void )
  35. {
  36. // Alyx gun cannot be picked up
  37. SetTouch(NULL);
  38. }
  39. float m_flTooCloseTimer;
  40. DECLARE_ACTTABLE();
  41. };
  42. #endif // WEAPON_ALYXGUN_H