about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-04-20 01:13:51 +0200
committeroy <Tom_Adams@web.de>2013-02-24 17:29:05 +0100
commit0036a07ce7bb34c86f25e7b1c4a28a621c8911fe (patch)
tree65b359533a36360c474dda9847e55d6498e0df1f /src/game/client
parent32c8dd6cf5c8bdcbd08c4f4cf1bd97c17d0167d9 (diff)
downloadzcatch-0036a07ce7bb34c86f25e7b1c4a28a621c8911fe.tar.gz
zcatch-0036a07ce7bb34c86f25e7b1c4a28a621c8911fe.zip
fixed that client displays active vote after connecting to a server
Diffstat (limited to 'src/game/client')
-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;