From 0cdcc3b08dcae45cdb2cc1d81ad25c209a74b391 Mon Sep 17 00:00:00 2001 From: jonas Date: Sun, 5 Jul 2026 15:56:53 +0200 Subject: [PATCH] rebuild vote hint list after vote retraction --- core/MenuVoting.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/MenuVoting.cpp b/core/MenuVoting.cpp index a0654f33..de38a24e 100644 --- a/core/MenuVoting.cpp +++ b/core/MenuVoting.cpp @@ -171,6 +171,12 @@ void VoteMenuHandler::OnClientDisconnected(int client) assert((unsigned)item < m_Items); assert(m_Votes[item] > 0); m_Votes[item]--; + + if (sm_vote_hintbox.GetBool()) + { + BuildVoteLeaders(); + DrawHintProgress(); + } } m_ClientVotes[client] = VOTE_NOT_VOTING; } @@ -273,6 +279,12 @@ bool VoteMenuHandler::RedrawToClient(int client, bool revotes) m_ClientVotes[client] = VOTE_PENDING; m_Revoting[client] = true; m_NumVotes--; + + if (sm_vote_hintbox.GetBool()) + { + BuildVoteLeaders(); + DrawHintProgress(); + } } if (m_nMenuTime == MENU_TIME_FOREVER) @@ -650,6 +662,7 @@ void VoteMenuHandler::BuildVoteLeaders() { if (m_NumVotes == 0 || !sm_vote_hintbox.GetBool()) { + m_leaderList[0] = '\0'; return; }