repeated start now allowed
authordisplacer
Sun, 04 Feb 2007 17:00:46 +0000
changeset 388 dcf5335940bd
parent 387 66345e38826d
child 389 9628e69b609f
repeated start now allowed
QTfrontend/netserver.cpp
QTfrontend/netserver.h
--- a/QTfrontend/netserver.cpp	Sun Feb 04 16:56:39 2007 +0000
+++ b/QTfrontend/netserver.cpp	Sun Feb 04 17:00:46 2007 +0000
@@ -138,6 +138,14 @@
   return true;
 }
 
+void HWNetServer::resetStart()
+{
+  QList<HWConnectedClient*>::iterator it;
+  for(it=connclients.begin(); it!=connclients.end(); ++it) {
+    (*it)->readyToStart=false;
+  }
+}
+
 QString HWNetServer::prepareConfig(QStringList lst)
 {
   QString msg=lst.join((QString)delimeter)+delimeter;
@@ -234,6 +242,7 @@
     if(m_hwserver->shouldStart(this)) {
       // start
       m_hwserver->sendAll("RUNGAME");
+      m_hwserver->resetStart();
     }
     return;
   }
--- a/QTfrontend/netserver.h	Sun Feb 04 16:56:39 2007 +0000
+++ b/QTfrontend/netserver.h	Sun Feb 04 17:00:46 2007 +0000
@@ -89,6 +89,7 @@
   void teamChanged();
   bool shouldStart(HWConnectedClient* client);
   QString prepareConfig(QStringList lst);
+  void resetStart();
 
  private:
   HWConnectedClient* getChiefClient() const;