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.

58 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Projectile shot by bullsquid
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef GRENADESPIT_H
  14. #define GRENADESPIT_H
  15. #include "basegrenade_shared.h"
  16. class CParticleSystem;
  17. enum SpitSize_e
  18. {
  19. SPIT_SMALL,
  20. SPIT_MEDIUM,
  21. SPIT_LARGE,
  22. };
  23. #define SPIT_GRAVITY 600
  24. class CGrenadeSpit : public CBaseGrenade
  25. {
  26. DECLARE_CLASS( CGrenadeSpit, CBaseGrenade );
  27. public:
  28. CGrenadeSpit( void );
  29. virtual void Spawn( void );
  30. virtual void Precache( void );
  31. virtual void Event_Killed( const CTakeDamageInfo &info );
  32. virtual unsigned int PhysicsSolidMaskForEntity( void ) const { return ( BaseClass::PhysicsSolidMaskForEntity() | CONTENTS_WATER ); }
  33. void GrenadeSpitTouch( CBaseEntity *pOther );
  34. void SetSpitSize( int nSize );
  35. void Detonate( void );
  36. void Think( void );
  37. private:
  38. DECLARE_DATADESC();
  39. void InitHissSound( void );
  40. CHandle< CParticleSystem > m_hSpitEffect;
  41. CSoundPatch *m_pHissSound;
  42. bool m_bPlaySound;
  43. };
  44. #endif //GRENADESPIT_H