3#ifndef GAME_CLIENT_COMPONENTS_VOTING_H
4#define GAME_CLIENT_COMPONENTS_VOTING_H
31 void Callvote(
const char *pType,
const char *pValue,
const char *pReason);
44 virtual int Sizeof()
const override {
return sizeof(*this); }
45 virtual void OnReset()
override;
47 virtual void OnMessage(
int Msgtype,
void *pRawMsg)
override;
51 void CallvoteSpectate(
int ClientId,
const char *pReason,
bool ForceVote =
false);
52 void CallvoteKick(
int ClientId,
const char *pReason,
bool ForceVote =
false);
53 void CallvoteOption(
int OptionId,
const char *pReason,
bool ForceVote =
false);
55 void AddvoteOption(
const char *pDescription,
const char *pCommand);
Definition: component.h:20
const char * VoteDescription() const
Definition: voting.h:63
int m_Total
Definition: voting.h:26
void Callvote(const char *pType, const char *pValue, const char *pReason)
Definition: voting.cpp:32
virtual int Sizeof() const override
Definition: voting.h:44
CVoteOptionClient * m_pRecycleFirst
Definition: voting.h:40
virtual void OnConsoleInit() override
Definition: voting.cpp:248
void ClearOptions()
Definition: voting.cpp:226
CVoteOptionClient * m_pRecycleLast
Definition: voting.h:41
void Vote(int v)
Definition: voting.cpp:146
int m_Pass
Definition: voting.h:26
void CallvoteKick(int ClientId, const char *pReason, bool ForceVote=false)
Definition: voting.cpp:67
void RemovevoteOption(int OptionId)
Definition: voting.cpp:112
void AddOption(const char *pDescription)
Definition: voting.cpp:165
bool IsVoting() const
Definition: voting.h:61
virtual void OnReset() override
Definition: voting.cpp:238
const char * VoteReason() const
Definition: voting.h:64
bool IsReceivingOptions() const
Definition: voting.h:65
int TakenChoice() const
Definition: voting.h:62
char m_aReason[VOTE_REASON_LENGTH]
Definition: voting.h:24
CHeap m_Heap
Definition: voting.h:16
int64_t m_Closetime
Definition: voting.h:22
int64_t m_Opentime
Definition: voting.h:21
void CallvoteSpectate(int ClientId, const char *pReason, bool ForceVote=false)
Definition: voting.cpp:51
void RenderBars(CUIRect Bars) const
Definition: voting.cpp:404
void Render()
Definition: voting.cpp:339
void RemoveOption(const char *pDescription)
Definition: voting.cpp:195
CVoting()
Definition: voting.cpp:159
static void ConCallvote(IConsole::IResult *pResult, void *pUserData)
Definition: voting.cpp:17
void CallvoteOption(int OptionId, const char *pReason, bool ForceVote=false)
Definition: voting.cpp:83
static void ConVote(IConsole::IResult *pResult, void *pUserData)
Definition: voting.cpp:23
char m_aDescription[VOTE_DESC_LENGTH]
Definition: voting.h:23
CVoteOptionClient * m_pLast
Definition: voting.h:38
CVoteOptionClient * m_pFirst
Definition: voting.h:37
void AddvoteOption(const char *pDescription, const char *pCommand)
Definition: voting.cpp:133
bool m_ReceivingOptions
Definition: voting.h:27
int m_No
Definition: voting.h:26
int m_Yes
Definition: voting.h:26
int m_NumVoteOptions
Definition: voting.h:36
int m_Voted
Definition: voting.h:25
int SecondsLeft() const
Definition: voting.cpp:154
virtual void OnMessage(int Msgtype, void *pRawMsg) override
Definition: voting.cpp:254
@ VOTE_DESC_LENGTH
Definition: voting.h:8
@ VOTE_REASON_LENGTH
Definition: voting.h:10