diff options
Diffstat (limited to 'src/game/client/components/menus_ingame.cpp')
| -rw-r--r-- | src/game/client/components/menus_ingame.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index 4b593989..01efda0a 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -325,16 +325,12 @@ void CMenus::RenderServerInfo(CUIRect MainView) void CMenus::RenderServerControlServer(CUIRect MainView) { - int NumOptions = 0; - for(CVoting::CVoteOption *pOption = m_pClient->m_pVoting->m_pFirst; pOption; pOption = pOption->m_pNext) - NumOptions++; - static int s_VoteList = 0; static float s_ScrollValue = 0; CUIRect List = MainView; - UiDoListboxStart(&s_VoteList, &List, 24.0f, Localize("Settings"), "", NumOptions, 1, m_CallvoteSelectedOption, s_ScrollValue); + UiDoListboxStart(&s_VoteList, &List, 24.0f, Localize("Settings"), "", m_pClient->m_pVoting->m_NumVoteOptions, 1, m_CallvoteSelectedOption, s_ScrollValue); - for(CVoting::CVoteOption *pOption = m_pClient->m_pVoting->m_pFirst; pOption; pOption = pOption->m_pNext) + for(CVoteOptionClient *pOption = m_pClient->m_pVoting->m_pFirst; pOption; pOption = pOption->m_pNext) { CListboxItem Item = UiDoListboxNextItem(pOption); |