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.

54 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef ENV_SPEAKER_H
  7. #define ENV_SPEAKER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // ===================================================================================
  12. //
  13. // Speaker class. Used for announcements per level, for door lock/unlock spoken voice.
  14. //
  15. class CSpeaker : public CPointEntity
  16. {
  17. public:
  18. DECLARE_CLASS( CSpeaker, CPointEntity );
  19. void Spawn( void );
  20. void Precache( void );
  21. DECLARE_DATADESC();
  22. virtual int ObjectCaps( void ) { return (BaseClass::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
  23. virtual IResponseSystem *GetResponseSystem() { return m_pInstancedResponseSystem; }
  24. virtual int Save( ISave &save );
  25. virtual int Restore( IRestore &restore );
  26. protected:
  27. void SpeakerThink( void );
  28. void InputToggle( inputdata_t &inputdata );
  29. float m_delayMin;
  30. float m_delayMax;
  31. string_t m_iszRuleScriptFile;
  32. string_t m_iszConcept;
  33. IResponseSystem *m_pInstancedResponseSystem;
  34. public:
  35. void InputTurnOff( inputdata_t &inputdata );
  36. void InputTurnOn( inputdata_t &inputdata );
  37. };
  38. #endif // ENV_SPEAKER_H