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.

85 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: TF Heal Grenade.
  4. //
  5. //=============================================================================//
  6. #ifndef TF_WEAPON_GRENADE_HEAL_H
  7. #define TF_WEAPON_GRENADE_HEAL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tf_weaponbase_grenade.h"
  12. #include "tf_weaponbase_grenadeproj.h"
  13. // Client specific.
  14. #ifdef CLIENT_DLL
  15. #define CTFGrenadeHeal C_TFGrenadeHeal
  16. #endif
  17. //=============================================================================
  18. //
  19. // TF Heal Grenade
  20. //
  21. class CTFGrenadeHeal : public CTFWeaponBaseGrenade
  22. {
  23. public:
  24. DECLARE_CLASS( CTFGrenadeHeal, CTFWeaponBaseGrenade );
  25. DECLARE_NETWORKCLASS();
  26. DECLARE_PREDICTABLE();
  27. // DECLARE_ACTTABLE();
  28. CTFGrenadeHeal() {}
  29. // Unique identifier.
  30. virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_HEAL; }
  31. // Server specific.
  32. #ifdef GAME_DLL
  33. DECLARE_DATADESC();
  34. virtual CTFWeaponBaseGrenadeProj *EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flTime, int iflags = 0 );
  35. #endif
  36. CTFGrenadeHeal( const CTFGrenadeHeal & ) {}
  37. };
  38. //=============================================================================
  39. //
  40. // TF Heal Grenade Projectile (Server specific.)
  41. //
  42. #ifdef GAME_DLL
  43. class CTFGrenadeHealProjectile : public CTFWeaponBaseGrenadeProj
  44. {
  45. public:
  46. DECLARE_CLASS( CTFGrenadeHealProjectile, CTFWeaponBaseGrenadeProj );
  47. // Unique identifier.
  48. virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_HEAL; }
  49. // Creation.
  50. static CTFGrenadeHealProjectile *Create( const Vector &position, const QAngle &angles, const Vector &velocity,
  51. const AngularImpulse &angVelocity, CBaseCombatCharacter *pOwner, const CTFWeaponInfo &weaponInfo, float timer, int iFlags = 0 );
  52. // Overrides.
  53. virtual void Spawn();
  54. virtual void Precache();
  55. virtual void BounceSound( void );
  56. virtual void Detonate();
  57. void DetonateThink( void );
  58. DECLARE_DATADESC();
  59. private:
  60. bool m_bPlayedLeadIn;
  61. };
  62. #endif
  63. #endif // TF_WEAPON_GRENADE_HEAL_H