Fix a bug when you are unable to do anything in lobby when room is closed during round
authorunc0rr
Tue, 01 Sep 2009 17:46:13 +0000
changeset 2340 3b35fd5f67c7
parent 2339 f1bbcca1ae07
child 2341 408edb2f254c
Fix a bug when you are unable to do anything in lobby when room is closed during round
QTfrontend/newnetclient.cpp
--- a/QTfrontend/newnetclient.cpp	Sun Aug 30 16:30:18 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Tue Sep 01 17:46:13 2009 +0000
@@ -548,6 +548,18 @@
 		return;
 	}
 
+	if (lst[0] == "ROOM_CONTROL_ACCESS") {
+		if (lst.size() < 2)
+		{
+			qWarning("Net: Bad BYE message");
+			return;
+		}
+		bool b = lst[1] == "0";
+		m_pGameCFGWidget->setEnabled(b);
+		m_pTeamSelWidget->setInteractivity(b);
+		isChief = b;
+	}
+
 	qWarning() << "Net: Unknown message:" << lst;
 }
 
@@ -618,7 +630,7 @@
 
 void HWNewNet::gameFinished()
 {
-	netClientState = 3;
+	if (netClientState == 5) netClientState = 3;
 	RawSendNet(QString("ROUNDFINISHED"));
 }