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.

69 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: CTF HealthKit.
  4. //
  5. //=============================================================================//
  6. #ifndef ENTITY_BONUSPACK_H
  7. #define ENTITY_BONUSPACK_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #ifdef GAME_DLL
  12. #include "tf_powerup.h"
  13. #include "entity_currencypack.h"
  14. #else
  15. #include "c_entity_currencypack.h"
  16. #endif
  17. #ifdef CLIENT_DLL
  18. #define CBonusPack C_BonusPack
  19. #endif
  20. DECLARE_AUTO_LIST( IBonusPackAutoList );
  21. class CBonusPack
  22. #ifdef GAME_DLL
  23. : public CCurrencyPack
  24. #else
  25. : public C_BaseAnimating
  26. #endif
  27. , public IBonusPackAutoList
  28. {
  29. public:
  30. DECLARE_DATADESC();
  31. #ifdef GAME_DLL
  32. DECLARE_CLASS( CBonusPack, CCurrencyPack );
  33. #else
  34. DECLARE_CLASS( CBonusPack, C_BaseAnimating );
  35. #endif
  36. DECLARE_NETWORKCLASS();
  37. CBonusPack();
  38. virtual void Spawn( void ) OVERRIDE;
  39. virtual void Precache( void ) OVERRIDE;
  40. #ifdef GAME_DLL
  41. virtual bool AffectedByRadiusCollection() const OVERRIDE { return false; }
  42. virtual bool MyTouch( CBasePlayer *pPlayer ) OVERRIDE;
  43. virtual bool ValidTouch( CBasePlayer *pPlayer ) OVERRIDE;
  44. virtual const char *GetDefaultPowerupModel( void ) OVERRIDE
  45. {
  46. return "models/bots/bot_worker/bot_worker_powercore.mdl";
  47. }
  48. private:
  49. void BlinkThink();
  50. int m_nBlinkCount;
  51. float m_flKillTime;
  52. float m_flCanPickupTime;
  53. #endif
  54. };
  55. #endif // ENTITY_BONUSPACK_H