mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed that client displays active vote after connecting to a server
This commit is contained in:
parent
32c8dd6cf5
commit
0036a07ce7
|
@ -120,7 +120,12 @@ void CVoting::Vote(int v)
|
|||
CVoting::CVoting()
|
||||
{
|
||||
ClearOptions();
|
||||
OnReset();
|
||||
|
||||
m_Closetime = 0;
|
||||
m_aDescription[0] = 0;
|
||||
m_aReason[0] = 0;
|
||||
m_Yes = m_No = m_Pass = m_Total = 0;
|
||||
m_Voted = 0;
|
||||
}
|
||||
|
||||
void CVoting::AddOption(const char *pDescription)
|
||||
|
@ -164,6 +169,9 @@ void CVoting::ClearOptions()
|
|||
|
||||
void CVoting::OnReset()
|
||||
{
|
||||
if(Client()->State() == IClient::STATE_LOADING) // do not reset active vote while connecting
|
||||
return;
|
||||
|
||||
m_Closetime = 0;
|
||||
m_aDescription[0] = 0;
|
||||
m_aReason[0] = 0;
|
||||
|
|
Loading…
Reference in a new issue