mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7752 from Robyt3/Menus-Vote-Selection-Reset
Fix wrong selection in vote menu when selected player leaves
This commit is contained in:
commit
a8146afa77
|
@ -568,8 +568,8 @@ bool CMenus::RenderServerControlServer(CUIRect MainView)
|
|||
bool CMenus::RenderServerControlKick(CUIRect MainView, bool FilterSpectators)
|
||||
{
|
||||
int NumOptions = 0;
|
||||
int Selected = 0;
|
||||
static int aPlayerIDs[MAX_CLIENTS];
|
||||
int Selected = -1;
|
||||
int aPlayerIDs[MAX_CLIENTS];
|
||||
for(const auto &pInfoByName : m_pClient->m_Snap.m_apInfoByName)
|
||||
{
|
||||
if(!pInfoByName)
|
||||
|
@ -584,7 +584,8 @@ bool CMenus::RenderServerControlKick(CUIRect MainView, bool FilterSpectators)
|
|||
|
||||
if(m_CallvoteSelectedPlayer == Index)
|
||||
Selected = NumOptions;
|
||||
aPlayerIDs[NumOptions++] = Index;
|
||||
aPlayerIDs[NumOptions] = Index;
|
||||
NumOptions++;
|
||||
}
|
||||
|
||||
static CListBox s_ListBox;
|
||||
|
|
Loading…
Reference in a new issue