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.

66 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: TRIPWIRE
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef WEAPONTRIPWIRE_H
  14. #define WEAPONTRIPWIRE_H
  15. #include "basegrenade_shared.h"
  16. #include "basehlcombatweapon.h"
  17. enum TripwireState_t
  18. {
  19. TRIPWIRE_TRIPMINE_READY,
  20. TRIPWIRE_SATCHEL_THROW,
  21. TRIPWIRE_SATCHEL_ATTACH,
  22. };
  23. class CWeapon_Tripwire : public CBaseHLCombatWeapon
  24. {
  25. public:
  26. DECLARE_CLASS( CWeapon_Tripwire, CBaseHLCombatWeapon );
  27. DECLARE_SERVERCLASS();
  28. bool m_bNeedReload;
  29. bool m_bClearReload;
  30. bool m_bAttachTripwire;
  31. void Spawn( void );
  32. void Precache( void );
  33. int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
  34. void PrimaryAttack( void );
  35. void SecondaryAttack( void );
  36. void WeaponIdle( void );
  37. void WeaponSwitch( void );
  38. void SetPickupTouch( void );
  39. void TripwireTouch( CBaseEntity *pOther ); // default weapon touch
  40. void ItemPostFrame( void );
  41. bool Reload( void );
  42. bool CanAttachTripwire(void); // In position where can attach TRIPWIRE?
  43. void StartTripwireAttach( void );
  44. void TripwireAttach( void );
  45. bool Deploy( void );
  46. bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
  47. CWeapon_Tripwire();
  48. DECLARE_ACTTABLE();
  49. DECLARE_DATADESC();
  50. };
  51. #endif //WEAPONTRIPWIRE_H