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.

64 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: CTF Achievement Zone.
  4. //
  5. //=============================================================================//
  6. #ifndef FUNC_ACHIEVEMENT_ZONE_H
  7. #define FUNC_ACHIEVEMENT_ZONE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "triggers.h"
  12. //=============================================================================
  13. //
  14. // CTF Achievement Zone class.
  15. //
  16. class CAchievementZone : public CBaseTrigger
  17. {
  18. DECLARE_CLASS( CAchievementZone, CBaseTrigger );
  19. public:
  20. DECLARE_DATADESC();
  21. CAchievementZone();
  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. int GetZoneID( void ){ return m_iZoneID; }
  33. private:
  34. bool m_bDisabled;
  35. int m_iZoneID;
  36. };
  37. // Return true if the specified entity is in an Achievement zone
  38. CAchievementZone *InAchievementZone( CBaseEntity *pEntity );
  39. #endif // FUNC_ACHIEVEMENT_ZONE_H