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.

39 lines
1003 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef FUNC_FLAG_ALERT_H
  7. #define FUNC_FLAG_ALERT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "triggers.h"
  12. #include "tf_shareddefs.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Designates an area that triggers an alert when a player carrying a flag starts touching the area
  15. //-----------------------------------------------------------------------------
  16. class CFuncFlagAlertZone : public CBaseTrigger
  17. {
  18. DECLARE_CLASS( CFuncFlagAlertZone, CBaseTrigger );
  19. public:
  20. DECLARE_DATADESC();
  21. CFuncFlagAlertZone();
  22. void Spawn( void );
  23. void StartTouch( CBaseEntity *pOther );
  24. private:
  25. float m_flNextAlertTime[TF_TEAM_COUNT];
  26. bool m_bPlaySound;
  27. int m_nAlertDelay;
  28. COutputEvent m_OnTriggeredByTeam1;
  29. COutputEvent m_OnTriggeredByTeam2;
  30. };
  31. #endif // FUNC_FLAG_ALERT_H