QTfrontend/team.cpp
changeset 341 184230eb4151
parent 339 7535ab6c3820
child 348 c91b983de18f
equal deleted inserted replaced
340:f5d4db927eba 341:184230eb4151
   201 	{
   201 	{
   202 		binds[i].strbind = hwform->ui.pageEditTeam->CBBind[i]->currentText();
   202 		binds[i].strbind = hwform->ui.pageEditTeam->CBBind[i]->currentText();
   203 	}
   203 	}
   204 }
   204 }
   205 
   205 
   206 QStringList HWTeam::TeamGameConfig(quint32 color, int hedgehogs, quint32 InitHealth, bool netTeam) const
   206 QStringList HWTeam::TeamGameConfig(quint32 InitHealth) const
   207 {
   207 {
   208 	QStringList sl;
   208 	QStringList sl;
   209 	sl.push_back("eaddteam");
   209 	sl.push_back("eaddteam");
   210 	sl.push_back(QString("ecolor %1").arg(color));
   210 	if (netTeam)
       
   211 		sl.push_back("erdriven");
       
   212 	sl.push_back(QString("ecolor %1").arg(teamColor.rgb() & 0xffffff));
   211 	sl.push_back("ename team " + TeamName);
   213 	sl.push_back("ename team " + TeamName);
   212 	for (int i = 0; i < hedgehogs; i++)
   214 
       
   215 	for (int i = 0; i < numHedgehogs; i++)
   213 		sl.push_back(QString("ename hh%1 ").arg(i).append(HHName[i]));
   216 		sl.push_back(QString("ename hh%1 ").arg(i).append(HHName[i]));
   214 	if(!netTeam) {
   217 
   215 	  sl.push_back(QString("egrave " + Grave));
   218 	sl.push_back(QString("egrave " + Grave));
   216 	  sl.push_back(QString("efort " + Fort));
   219 	sl.push_back(QString("efort " + Fort));
   217 	  for(int i = 0; i < BINDS_NUMBER; i++)
   220 
   218 	    {
   221 	if (!netTeam)
   219 	      sl.push_back(QString("ebind " + binds[i].strbind + " " + binds[i].action));
   222 		for(int i = 0; i < BINDS_NUMBER; i++)
   220 	    }
   223 			sl.push_back(QString("ebind " + binds[i].strbind + " " + binds[i].action));
   221 	}
   224 
   222 	for (int t = 0; t < hedgehogs; t++)
   225 	for (int t = 0; t < numHedgehogs; t++)
   223 	  sl.push_back(QString("eaddhh %1 %2")
   226 	  sl.push_back(QString("eaddhh %1 %2")
   224 		       .arg(QString::number(difficulty),
   227 		       .arg(QString::number(difficulty),
   225 			    QString::number(InitHealth)));
   228 			    QString::number(InitHealth)));
   226 	return sl;
   229 	return sl;
   227 }
   230 }