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.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef RADIO_STATUS_H
  8. #define RADIO_STATUS_H
  9. #pragma once
  10. class IMaterial;
  11. class CRadioStatus : public CAutoGameSystem
  12. {
  13. public:
  14. CRadioStatus();
  15. virtual bool Init();
  16. virtual void Shutdown();
  17. virtual void LevelInitPostEntity();
  18. virtual void LevelShutdownPreEntity();
  19. public:
  20. // Called when a player uses the radio
  21. void UpdateRadioStatus(int entindex, float duration);
  22. // Called when a player (bot) speaks a wav file
  23. void UpdateVoiceStatus(int entindex, float duration);
  24. // Call from the HUD_CreateEntities function so it can add sprites above player heads.
  25. void DrawHeadLabels();
  26. private:
  27. float m_radioUntil[MAX_PLAYERS]; // Who is currently talking. Indexed by client index.
  28. IMaterial *m_pHeadLabelMaterial; // For labels above players' heads.
  29. void ExpireBotVoice( bool force = false );
  30. float m_voiceUntil[MAX_PLAYERS]; // Who is currently talking. Indexed by client index.
  31. };
  32. // Get the (global) voice manager.
  33. CRadioStatus* RadioManager();
  34. #endif // RADIO_STATUS_H