summaryrefslogtreecommitdiff
path: root/game/client/cstrike/radio_status.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/cstrike/radio_status.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/cstrike/radio_status.h')
-rw-r--r--game/client/cstrike/radio_status.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/game/client/cstrike/radio_status.h b/game/client/cstrike/radio_status.h
new file mode 100644
index 0000000..a820ba8
--- /dev/null
+++ b/game/client/cstrike/radio_status.h
@@ -0,0 +1,51 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef RADIO_STATUS_H
+#define RADIO_STATUS_H
+#pragma once
+
+class IMaterial;
+
+class CRadioStatus : public CAutoGameSystem
+{
+public:
+ CRadioStatus();
+
+ virtual bool Init();
+ virtual void Shutdown();
+
+ virtual void LevelInitPostEntity();
+ virtual void LevelShutdownPreEntity();
+
+public:
+
+ // Called when a player uses the radio
+ void UpdateRadioStatus(int entindex, float duration);
+
+ // Called when a player (bot) speaks a wav file
+ void UpdateVoiceStatus(int entindex, float duration);
+
+ // Call from the HUD_CreateEntities function so it can add sprites above player heads.
+ void DrawHeadLabels();
+
+private:
+
+
+ float m_radioUntil[MAX_PLAYERS]; // Who is currently talking. Indexed by client index.
+ IMaterial *m_pHeadLabelMaterial; // For labels above players' heads.
+
+ void ExpireBotVoice( bool force = false );
+ float m_voiceUntil[MAX_PLAYERS]; // Who is currently talking. Indexed by client index.
+};
+
+
+// Get the (global) voice manager.
+CRadioStatus* RadioManager();
+
+
+#endif // RADIO_STATUS_H