diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 080d160d3..e9caa6ab7 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -779,7 +779,6 @@ void CGameContext::StartVote(const char *pDesc, const char *pCommand, const char { // reset votes m_VoteEnforce = VOTE_ENFORCE_UNKNOWN; - m_VoteEnforcer = -1; for(auto &pPlayer : m_apPlayers) { if(pPlayer) @@ -1210,7 +1209,7 @@ void CGameContext::OnTick() } else if(m_VoteEnforce == VOTE_ENFORCE_YES_ADMIN) { - Console()->ExecuteLine(m_aVoteCommand, m_VoteEnforcer); + Console()->ExecuteLine(m_aVoteCommand, m_VoteCreator); SendChat(-1, TEAM_ALL, "Vote passed enforced by authorized player", -1, FLAG_SIX); EndVote(); } @@ -4832,7 +4831,6 @@ void CGameContext::ForceVote(int EnforcerId, bool Success) return; m_VoteEnforce = Success ? CGameContext::VOTE_ENFORCE_YES_ADMIN : CGameContext::VOTE_ENFORCE_NO_ADMIN; - m_VoteEnforcer = EnforcerId; char aBuf[256]; const char *pOption = Success ? "yes" : "no"; diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index d71a9b735..58621aa7a 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -576,7 +576,6 @@ public: VOTE_TYPE_SPECTATE, }; int m_VoteVictim; - int m_VoteEnforcer; inline bool IsOptionVote() const { return m_VoteType == VOTE_TYPE_OPTION; } inline bool IsKickVote() const { return m_VoteType == VOTE_TYPE_KICK; }