network teams hedgehogs nums modifications now working from chief client
authordisplacer
Sun, 21 Jan 2007 22:27:42 +0000
changeset 356 ca3a5dfcae75
parent 355 40c68869899e
child 357 165a040e4cfa
network teams hedgehogs nums modifications now working from chief client
QTfrontend/newnetclient.cpp
QTfrontend/teamselect.cpp
--- a/QTfrontend/newnetclient.cpp	Sun Jan 21 21:31:10 2007 +0000
+++ b/QTfrontend/newnetclient.cpp	Sun Jan 21 22:27:42 2007 +0000
@@ -237,6 +237,10 @@
   	}
   	if (lst[1] == "HHNUM") {
 	  HWTeam tmptm(lst[2], lst[3].toUInt());
+	  QMap<unsigned int, QString>::iterator it=m_networkToLocalteams.find(lst[3].toUInt());
+	  if(it!=m_networkToLocalteams.end()) {
+	    tmptm=HWTeam(lst[2]); // local team should be changed
+	  }
 	  tmptm.numHedgehogs=lst[4].toUInt();
 	  emit hhnumChanged(tmptm);
 	  return;
--- a/QTfrontend/teamselect.cpp	Sun Jan 21 21:31:10 2007 +0000
+++ b/QTfrontend/teamselect.cpp	Sun Jan 21 22:27:42 2007 +0000
@@ -33,6 +33,8 @@
     curPlayingTeams.push_back(team);
     connect(framePlaying->getTeamWidget(team), SIGNAL(teamStatusChanged(HWTeam)),
 		     this, SLOT(netTeamStatusChanged(const HWTeam&)));
+    connect(framePlaying->getTeamWidget(team), SIGNAL(hhNmChanged(const HWTeam&)), 
+			    this, SLOT(hhNumChanged(const HWTeam&)));
   } else {
     frameDontPlaying->addTeam(team, false);
     curDontPlayingTeams.push_back(team);