Counter Strike : Global Offensive Source Code
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.

51 lines
1.3 KiB

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