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.

83 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: SLAM
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef WEAPONSLAM_H
  14. #define WEAPONSLAM_H
  15. #ifndef HL2MP
  16. #include "basegrenade_shared.h"
  17. #include "basehlcombatweapon.h"
  18. enum SlamState_t
  19. {
  20. SLAM_TRIPMINE_READY,
  21. SLAM_SATCHEL_THROW,
  22. SLAM_SATCHEL_ATTACH,
  23. };
  24. class CWeapon_SLAM : public CBaseHLCombatWeapon
  25. {
  26. public:
  27. DECLARE_CLASS( CWeapon_SLAM, CBaseHLCombatWeapon );
  28. DECLARE_SERVERCLASS();
  29. SlamState_t m_tSlamState;
  30. bool m_bDetonatorArmed;
  31. bool m_bNeedDetonatorDraw;
  32. bool m_bNeedDetonatorHolster;
  33. bool m_bNeedReload;
  34. bool m_bClearReload;
  35. bool m_bThrowSatchel;
  36. bool m_bAttachSatchel;
  37. bool m_bAttachTripmine;
  38. float m_flWallSwitchTime;
  39. void Spawn( void );
  40. void Precache( void );
  41. int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
  42. void PrimaryAttack( void );
  43. void SecondaryAttack( void );
  44. void WeaponIdle( void );
  45. void WeaponSwitch( void );
  46. void SLAMThink( void );
  47. void SetPickupTouch( void );
  48. void SlamTouch( CBaseEntity *pOther ); // default weapon touch
  49. void ItemPostFrame( void );
  50. bool Reload( void );
  51. void SetSlamState( SlamState_t newState );
  52. bool CanAttachSLAM(void); // In position where can attach SLAM?
  53. bool AnyUndetonatedCharges(void);
  54. void StartTripmineAttach( void );
  55. void TripmineAttach( void );
  56. void StartSatchelDetonate( void );
  57. void SatchelDetonate( void );
  58. void StartSatchelThrow( void );
  59. void StartSatchelAttach( void );
  60. void SatchelThrow( void );
  61. void SatchelAttach( void );
  62. bool Deploy( void );
  63. bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
  64. CWeapon_SLAM();
  65. DECLARE_ACTTABLE();
  66. DECLARE_DATADESC();
  67. };
  68. #endif //HL2MP
  69. #endif //WEAPONSLAM_H