QTfrontend/game.cpp
changeset 213 c5480c5b11ff
parent 210 440575778475
child 214 3cd2b0f4531e
--- a/QTfrontend/game.cpp	Sat Oct 28 13:18:23 2006 +0000
+++ b/QTfrontend/game.cpp	Sat Oct 28 15:09:51 2006 +0000
@@ -61,8 +61,9 @@
 	{
 		SendIPC("eaddteam");
 		LocalCFG(teams[i]);
-		SendIPC(QString("ecolor %1").arg(65535 << i * 8).toAscii());
-		for (int t = 0; t < hdNum[teams[i]]; t++)
+		QColor clr=m_teamsParams[teams[i]].teamColor;
+		SendIPC(QString("ecolor %1").arg(clr.rgb()).toAscii());//&0xFFFFFF
+		for (int t = 0; t < m_teamsParams[teams[i]].numHedgehogs; t++)
 			SendIPC(QString("eadd hh%1 0").arg(t).toAscii());
 	}
 }
@@ -189,12 +190,12 @@
 	return arguments;
 }
 
-void HWGame::AddTeam(const QString & teamname, unsigned char numHedgedogs)
+void HWGame::AddTeam(const QString & teamname, HWTeamTempParams teamParams)
 {
 	if (TeamCount == 5) return;
 	teams[TeamCount] = teamname;
 	TeamCount++;
-	hdNum[teamname]=numHedgedogs;
+	m_teamsParams[teamname]=teamParams;
 }
 
 void HWGame::SaveDemo(const QString & filename)