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.

48 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef LOGICRELAY_H
  9. #define LOGICRELAY_H
  10. #include "cbase.h"
  11. #include "entityinput.h"
  12. #include "entityoutput.h"
  13. #include "eventqueue.h"
  14. class CLogicRelay : public CLogicalEntity
  15. {
  16. public:
  17. DECLARE_CLASS( CLogicRelay, CLogicalEntity );
  18. CLogicRelay();
  19. void Activate();
  20. void Think();
  21. // Input handlers
  22. void InputEnable( inputdata_t &inputdata );
  23. void InputEnableRefire( inputdata_t &inputdata ); // Private input handler, not in FGD
  24. void InputDisable( inputdata_t &inputdata );
  25. void InputToggle( inputdata_t &inputdata );
  26. void InputTrigger( inputdata_t &inputdata );
  27. void InputCancelPending( inputdata_t &inputdata );
  28. DECLARE_DATADESC();
  29. // Outputs
  30. COutputEvent m_OnTrigger;
  31. COutputEvent m_OnSpawn;
  32. bool IsDisabled( void ){ return m_bDisabled; }
  33. private:
  34. bool m_bDisabled;
  35. bool m_bWaitForRefire; // Set to disallow a refire while we are waiting for our outputs to finish firing.
  36. };
  37. #endif //LOGICRELAY_H