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.

91 lines
2.2 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. #include "basegrenade_shared.h"
  16. #include "weapon_hl2mpbasehlmpcombatweapon.h"
  17. enum
  18. {
  19. SLAM_TRIPMINE_READY,
  20. SLAM_SATCHEL_THROW,
  21. SLAM_SATCHEL_ATTACH,
  22. };
  23. #ifdef CLIENT_DLL
  24. #define CWeapon_SLAM C_Weapon_SLAM
  25. #endif
  26. class CWeapon_SLAM : public CBaseHL2MPCombatWeapon
  27. {
  28. public:
  29. DECLARE_CLASS( CWeapon_SLAM, CBaseHL2MPCombatWeapon );
  30. DECLARE_NETWORKCLASS();
  31. DECLARE_PREDICTABLE();
  32. CNetworkVar( int, m_tSlamState );
  33. CNetworkVar( bool, m_bDetonatorArmed );
  34. CNetworkVar( bool, m_bNeedDetonatorDraw);
  35. CNetworkVar( bool, m_bNeedDetonatorHolster);
  36. CNetworkVar( bool, m_bNeedReload);
  37. CNetworkVar( bool, m_bClearReload);
  38. CNetworkVar( bool, m_bThrowSatchel);
  39. CNetworkVar( bool, m_bAttachSatchel);
  40. CNetworkVar( bool, m_bAttachTripmine);
  41. float m_flWallSwitchTime;
  42. void Spawn( void );
  43. void Precache( void );
  44. void PrimaryAttack( void );
  45. void SecondaryAttack( void );
  46. void WeaponIdle( void );
  47. void Weapon_Switch( void );
  48. void SLAMThink( void );
  49. void SetPickupTouch( void );
  50. void SlamTouch( CBaseEntity *pOther ); // default weapon touch
  51. void ItemPostFrame( void );
  52. bool Reload( void );
  53. void SetSlamState( int newState );
  54. bool CanAttachSLAM(void); // In position where can attach SLAM?
  55. bool AnyUndetonatedCharges(void);
  56. void StartTripmineAttach( void );
  57. void TripmineAttach( void );
  58. void StartSatchelDetonate( void );
  59. void SatchelDetonate( void );
  60. void StartSatchelThrow( void );
  61. void StartSatchelAttach( void );
  62. void SatchelThrow( void );
  63. void SatchelAttach( void );
  64. bool Deploy( void );
  65. bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
  66. CWeapon_SLAM();
  67. #ifndef CLIENT_DLL
  68. DECLARE_ACTTABLE();
  69. DECLARE_DATADESC();
  70. #endif
  71. private:
  72. CWeapon_SLAM( const CWeapon_SLAM & );
  73. };
  74. #endif //WEAPONSLAM_H