about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/game/client/components/voting.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/client/components/voting.cpp b/src/game/client/components/voting.cpp
index 675d6770..13dbc8a2 100644
--- a/src/game/client/components/voting.cpp
+++ b/src/game/client/components/voting.cpp
@@ -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;