--- a/QTfrontend/newnetclient.cpp Thu Oct 09 13:48:06 2008 +0000
+++ b/QTfrontend/newnetclient.cpp Thu Oct 09 13:53:03 2008 +0000
@@ -254,7 +254,7 @@
}
if (lst[0] == "REMOVE_TEAM") {
- if(lst.size() < 3)
+ if(lst.size() != 2)
{
qWarning("Net: Bad REMOVETEAM message");
return;
@@ -345,13 +345,6 @@
emit ammoChanged(lst[3], lst[2]);
return;
}
-/* QStringList hhTmpList = lst[1].split('+');// deprecated stuff
- if (hhTmpList[0] == "TEAM_COLOR") {
- HWTeam tmptm(hhTmpList[1]);
- tmptm.teamColor = QColor(lst[2]);
- emit teamColorChanged(tmptm);
- return;
- }*/
qWarning() << "Net: Unknown 'CONFIG_PARAM' message:" << lst;
return;
}
@@ -368,6 +361,18 @@
return;
}
+ if (lst[0] == "TEAM_COLOR") {
+ if (lst.size() != 3)
+ {
+ qWarning("Net: Bad TEAM_COLOR message");
+ return;
+ }
+ HWTeam tmptm(lst[1]);
+ tmptm.teamColor = QColor(lst[2]);
+ emit teamColorChanged(tmptm);
+ return;
+ }
+
if (lst[0] == "GAMEMSG") {
if(lst.size() < 2)
{
@@ -405,6 +410,7 @@
void HWNewNet::onHedgehogsNumChanged(const HWTeam& team)
{
+ if (isChief)
RawSendNet(QString("HH_NUM%1%2%1%3")
.arg(delimeter)
.arg(team.TeamName)
@@ -413,7 +419,8 @@
void HWNewNet::onTeamColorChanged(const HWTeam& team)
{
- RawSendNet(QString("CONFIG_PARAM%1TEAM_COLOR%1%2%1%3")
+ if (isChief)
+ RawSendNet(QString("TEAM_COLOR%1%2%1%3")
.arg(delimeter)
.arg(team.TeamName)
.arg(team.teamColor.name()));