summaryrefslogtreecommitdiff
path: root/game/client/c_vote_controller.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/c_vote_controller.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/c_vote_controller.h')
-rw-r--r--game/client/c_vote_controller.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/game/client/c_vote_controller.h b/game/client/c_vote_controller.h
new file mode 100644
index 0000000..5c1a4c5
--- /dev/null
+++ b/game/client/c_vote_controller.h
@@ -0,0 +1,46 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Client VoteController
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef C_VoteController_H
+#define C_VoteController_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "shareddefs.h"
+#include "GameEventListener.h"
+
+class C_VoteController : public C_BaseEntity, public CGameEventListener
+{
+ DECLARE_CLASS( C_VoteController, C_BaseEntity );
+public:
+ DECLARE_CLIENTCLASS();
+
+ C_VoteController();
+ virtual ~C_VoteController();
+
+ virtual void Spawn( void );
+ virtual void ClientThink( void );
+
+ static void RecvProxy_VoteType( const CRecvProxyData *pData, void *pStruct, void *pOut );
+ static void RecvProxy_VoteOption( const CRecvProxyData *pData, void *pStruct, void *pOut );
+
+ void FireGameEvent( IGameEvent *event );
+protected:
+ void ResetData();
+
+ int m_iActiveIssueIndex;
+ int m_iOnlyTeamToVote;
+ int m_nVoteOptionCount[MAX_VOTE_OPTIONS];
+ int m_iVoteChoiceIndex;
+ int m_nPotentialVotes;
+ bool m_bVotesDirty; // Received a vote, so remember to tell the Hud
+ bool m_bTypeDirty; // Vote type changed, so show or hide the Hud
+ bool m_bIsYesNoVote;
+};
+
+#endif // C_VoteController_H