fixed that client displays active vote after connecting to a server

This commit is contained in:
oy 2012-04-20 01:13:51 +02:00
parent 32c8dd6cf5
commit 0036a07ce7

View file

@ -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;