Counter Strike : Global Offensive Source Code
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.

60 lines
1.4 KiB

  1. //========= Copyright � 1996-2009, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Healthshot, it makes you go
  4. //
  5. // $NoKeywords: $
  6. //=====================================================================================//
  7. #ifndef _ITEM_HEALTHSHOT_H_
  8. #define _ITEM_HEALTHSHOT_H_
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "weapon_baseitem.h"
  13. #include "util_shared.h"
  14. #if defined( CLIENT_DLL )
  15. #define CItem_Healthshot C_Item_Healthshot
  16. #endif
  17. //-----------------------------------------------------------------------------------------------------------
  18. /**
  19. * Healthshot. When used, give the player speed boost for a short amount of time
  20. */
  21. class CItem_Healthshot : public CWeaponBaseItem
  22. {
  23. public:
  24. DECLARE_CLASS( CItem_Healthshot, CWeaponBaseItem );
  25. DECLARE_NETWORKCLASS();
  26. DECLARE_PREDICTABLE();
  27. // #ifndef CLIENT_DLL
  28. // DECLARE_DATADESC();
  29. // #endif
  30. CItem_Healthshot() {}
  31. virtual void Precache( void );
  32. virtual bool CanPrimaryAttack( void );
  33. virtual CSWeaponID GetCSWeaponID( void ) const { return WEAPON_HEALTHSHOT; }
  34. void DropHealthshot( void );
  35. // CBaseBeltItem
  36. virtual bool CanUseOnSelf( CCSPlayer *pPlayer );
  37. virtual void OnStartUse( CCSPlayer *pPlayer );
  38. virtual float GetUseTimerDuration( void );
  39. virtual void WeaponIdle();
  40. #ifndef CLIENT_DLL
  41. virtual void CompleteUse( CCSPlayer *pPlayer );
  42. #endif
  43. private:
  44. CItem_Healthshot( const CItem_Healthshot & ) {}
  45. };
  46. #endif // _ITEM_HEALTHSHOT_H_