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.

46 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Client VoteController
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef C_VoteController_H
  8. #define C_VoteController_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "shareddefs.h"
  13. #include "GameEventListener.h"
  14. class C_VoteController : public C_BaseEntity, public CGameEventListener
  15. {
  16. DECLARE_CLASS( C_VoteController, C_BaseEntity );
  17. public:
  18. DECLARE_CLIENTCLASS();
  19. C_VoteController();
  20. virtual ~C_VoteController();
  21. virtual void Spawn( void );
  22. virtual void ClientThink( void );
  23. static void RecvProxy_VoteType( const CRecvProxyData *pData, void *pStruct, void *pOut );
  24. static void RecvProxy_VoteOption( const CRecvProxyData *pData, void *pStruct, void *pOut );
  25. void FireGameEvent( IGameEvent *event );
  26. protected:
  27. void ResetData();
  28. int m_iActiveIssueIndex;
  29. int m_iOnlyTeamToVote;
  30. int m_nVoteOptionCount[MAX_VOTE_OPTIONS];
  31. int m_iVoteChoiceIndex;
  32. int m_nPotentialVotes;
  33. bool m_bVotesDirty; // Received a vote, so remember to tell the Hud
  34. bool m_bTypeDirty; // Vote type changed, so show or hide the Hud
  35. bool m_bIsYesNoVote;
  36. };
  37. #endif // C_VoteController_H