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.

65 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Molotov weapon
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #include "basehlcombatweapon.h"
  14. #ifndef WEAPON_MOLOTOV_H
  15. #define WEAPON_MOLOTOV_H
  16. class CGrenade_Molotov;
  17. class CWeaponMolotov : public CBaseHLCombatWeapon
  18. {
  19. public:
  20. DECLARE_CLASS( CWeaponMolotov, CBaseHLCombatWeapon );
  21. DECLARE_SERVERCLASS();
  22. private:
  23. int m_nNumAmmoTypes;
  24. bool m_bNeedDraw;
  25. int m_iThrowBits; // Save the current throw bits state
  26. float m_fNextThrowCheck; // When to check throw ability next
  27. Vector m_vecTossVelocity;
  28. public:
  29. void Precache( void );
  30. void Spawn( void );
  31. void DrawAmmo( void );
  32. virtual int WeaponRangeAttack1Condition( float flDot, float flDist );
  33. virtual bool WeaponLOSCondition(const Vector &ownerPos, const Vector &targetPos, bool bSetConditions);
  34. void SetPickupTouch( void );
  35. void MolotovTouch( CBaseEntity *pOther ); // default weapon touch
  36. int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; }
  37. bool ObjectInWay( void );
  38. void ThrowMolotov( const Vector &vecSrc, const Vector &vecVelocity);
  39. void ItemPostFrame( void );
  40. void PrimaryAttack( void );
  41. void SecondaryAttack( void );
  42. void Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator );
  43. DECLARE_ACTTABLE();
  44. DECLARE_DATADESC();
  45. CWeaponMolotov(void);
  46. };
  47. #endif //WEAPON_MOLOTOV_H