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.

61 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: CTF NoGrenades Zone.
  4. //
  5. //=============================================================================//
  6. #ifndef FUNC_NOGRENADES_ZONE_H
  7. #define FUNC_NOGRENADES_ZONE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "triggers.h"
  12. #define NOGRENADE_SPRITE "sprites/light_glow02_noz.vmt"
  13. //=============================================================================
  14. //
  15. // CTF NoGrenades Zone class.
  16. //
  17. class CNoGrenadesZone : public CBaseTrigger
  18. {
  19. public:
  20. DECLARE_CLASS( CNoGrenadesZone, CBaseTrigger );
  21. CNoGrenadesZone();
  22. void Spawn( void );
  23. void Precache( void );
  24. // Return true if the specified entity is touching this zone
  25. bool IsTouching( const CBaseEntity *pEntity ) const OVERRIDE;
  26. bool IsDisabled( void );
  27. void SetDisabled( bool bDisabled );
  28. // Input handlers
  29. void InputEnable( inputdata_t &inputdata );
  30. void InputDisable( inputdata_t &inputdata );
  31. void InputToggle( inputdata_t &inputdata );
  32. private:
  33. bool m_bDisabled;
  34. };
  35. // Return true if the specified entity is in a NoGrenades zone
  36. bool InNoGrenadeZone( CBaseEntity *pEntity );
  37. #endif // FUNC_NOGRENADES_ZONE_H