QTfrontend/newnetclient.cpp
changeset 352 4665bfe25470
parent 349 5b37d6a39829
child 354 60e4af0a4375
--- a/QTfrontend/newnetclient.cpp	Sun Jan 21 19:51:02 2007 +0000
+++ b/QTfrontend/newnetclient.cpp	Sun Jan 21 19:53:25 2007 +0000
@@ -168,8 +168,8 @@
   }
 
   if (lst[0] == "REMOVETEAM:") {
-    if(lst.size()<2) return;
-    m_pTeamSelWidget->removeNetTeam(HWTeam(lst[1], true));
+    if(lst.size()<3) return;
+    m_pTeamSelWidget->removeNetTeam(HWTeam(lst[1], lst[2].toUInt()));
     return;
   }
 
@@ -229,6 +229,12 @@
 	  emit fortsModeChanged(lst[2].toInt() != 0);
 	  return;
   	}
+  	if (lst[1] == "HHNUM") {
+	  HWTeam tmptm(lst[2], lst[3].toUInt());
+	  tmptm.numHedgehogs=lst[4].toUInt();
+	  emit hhnumChanged(tmptm);
+	  return;
+  	}
   	qDebug() << "unknow config param: " << lst[1];
     return;
   }
@@ -265,6 +271,12 @@
   game->StartNet();
 }
 
+void HWNewNet::onHedgehogsNumChanged(const HWTeam& team)
+{
+  qDebug() << team.getNetID() << ":" << team.numHedgehogs;
+  RawSendNet(QString("CONFIG_PARAM%1HHNUM%1%2%1%3%1%4").arg(delimeter).arg(team.TeamName).arg(team.getNetID()).arg(team.numHedgehogs));
+}
+
 void HWNewNet::onSeedChanged(const QString & seed)
 {
   RawSendNet(QString("CONFIG_PARAM%1SEED%1%2").arg(delimeter).arg(seed));