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.

77 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: TF Napalm Grenade.
  4. //
  5. //=============================================================================//
  6. #ifndef TF_WEAPON_GRENADE_NAPALM_H
  7. #define TF_WEAPON_GRENADE_NAPALM_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 CTFGrenadeNapalm C_TFGrenadeNapalm
  16. #endif
  17. //=============================================================================
  18. //
  19. // TF Napalm Grenade
  20. //
  21. class CTFGrenadeNapalm : public CTFWeaponBaseGrenade
  22. {
  23. public:
  24. DECLARE_CLASS( CTFGrenadeNapalm, CTFWeaponBaseGrenade );
  25. DECLARE_NETWORKCLASS();
  26. DECLARE_PREDICTABLE();
  27. CTFGrenadeNapalm() {}
  28. // Unique identifier.
  29. virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_NAPALM; }
  30. // Server specific.
  31. #ifdef GAME_DLL
  32. DECLARE_DATADESC();
  33. virtual CTFWeaponBaseGrenadeProj *EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flTime, int iflags = 0 );
  34. #endif
  35. CTFGrenadeNapalm( const CTFGrenadeNapalm & ) {}
  36. };
  37. //=============================================================================
  38. //
  39. // TF Napalm Grenade Projectile (Server specific.)
  40. //
  41. #ifdef GAME_DLL
  42. class CTFGrenadeNapalmProjectile : public CTFWeaponBaseGrenadeProj
  43. {
  44. public:
  45. DECLARE_CLASS( CTFGrenadeNapalmProjectile, CTFWeaponBaseGrenadeProj );
  46. // Unique identifier.
  47. virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_NAPALM; }
  48. // Creation.
  49. static CTFGrenadeNapalmProjectile *Create( const Vector &position, const QAngle &angles, const Vector &velocity,
  50. const AngularImpulse &angVelocity, CBaseCombatCharacter *pOwner, const CTFWeaponInfo &weaponInfo, float timer, int iFlags = 0 );
  51. // Overrides.
  52. virtual void Spawn();
  53. virtual void Precache();
  54. virtual void BounceSound( void );
  55. virtual void Detonate();
  56. };
  57. #endif
  58. #endif // TF_WEAPON_GRENADE_NAPALM_H