--- a/QTfrontend/newnetclient.cpp Sun Jan 21 20:14:49 2007 +0000
+++ b/QTfrontend/newnetclient.cpp Sun Jan 21 21:27:07 2007 +0000
@@ -175,6 +175,7 @@
if(lst[0]=="SLAVE") {
m_pGameCFGWidget->setEnabled(false);
+ return;
}
if (lst[0] == "CONFIGASKED") {
@@ -204,6 +205,11 @@
return;
}
+ if(lst[0]=="TEAM_ACCEPTED") {
+ m_networkToLocalteams.insert(lst[2].toUInt(), lst[1]);
+ return;
+ }
+
if (lst[0] == "CONFIG_PARAM") {
if (lst[1] == "SEED") {
emit seedChanged(lst[2]);
@@ -274,7 +280,9 @@
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));
+ RawSendNet(QString("CONFIG_PARAM%1HHNUM%1%2%1%3%1%4").arg(delimeter).arg(team.TeamName)\
+ .arg(team.getNetID() ? team.getNetID() : m_networkToLocalteams.key(team.TeamName))\
+ .arg(team.numHedgehogs));
}
void HWNewNet::onSeedChanged(const QString & seed)