QTfrontend/hwform.cpp
changeset 152 c558957ef644
parent 151 9eb5a4cee35e
child 157 8e3e11bb0a5f
--- a/QTfrontend/hwform.cpp	Mon Sep 18 17:37:22 2006 +0000
+++ b/QTfrontend/hwform.cpp	Mon Sep 18 17:56:27 2006 +0000
@@ -258,11 +258,9 @@
 void HWForm::StartMPGame()
 {
 	game = new HWGame(config, ui.pageMultiplayer->gameCFG);
-	QStringList teamslist = config->GetTeamsList();
-	for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
-	  if(ui.pageMultiplayer->teamsSelect->isPlaying(*it)) {
-	    game->AddTeam(*it, ui.pageMultiplayer->teamsSelect->numHedgedogs(*it));
-	  }
+	list<HWTeam> teamslist=ui.pageMultiplayer->teamsSelect->getPlayingTeams();
+	for (list<HWTeam>::const_iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
+	  game->AddTeam(it->TeamName, ui.pageMultiplayer->teamsSelect->numHedgedogs(it->TeamName));
 	}
 	game->StartLocal();
 }