diff -r b432c4b9cc9b -r daffc14a518a QTfrontend/game.cpp --- a/QTfrontend/game.cpp Sat Sep 24 22:27:20 2011 +0400 +++ b/QTfrontend/game.cpp Sat Sep 24 22:14:10 2011 +0200 @@ -99,7 +99,7 @@ HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber))); if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore")); HWProto::addStringListToBuffer(buf, - team.TeamGameConfig(gamecfg->getInitHealth())); + team.teamGameConfig(gamecfg->getInitHealth())); ; } } @@ -122,25 +122,23 @@ HWNamegen namegen; - HWTeam * team1; - team1 = new HWTeam; - team1->difficulty = 0; - team1->teamColor = QColor(colors[0]); - team1->numHedgehogs = 4; - namegen.TeamRandomNames(team1,TRUE); + HWTeam team1; + team1.setDifficulty(0); + team1.setColor(QColor(colors[0])); + team1.setNumHedgehogs(4); + namegen.teamRandomNames(team1,TRUE); HWProto::addStringListToBuffer(teamscfg, - team1->TeamGameConfig(100)); + team1.teamGameConfig(100)); - HWTeam * team2; - team2 = new HWTeam; - team2->difficulty = 4; - team2->teamColor = QColor(colors[1]); - team2->numHedgehogs = 4; - do - namegen.TeamRandomNames(team2,TRUE); - while(!team2->TeamName.compare(team1->TeamName) || !team2->Hedgehogs[0].Hat.compare(team1->Hedgehogs[0].Hat)); + HWTeam team2; + team2.setDifficulty(4); + team2.setColor(QColor(colors[1])); + team2.setNumHedgehogs(4); + do + namegen.teamRandomNames(team2,TRUE); + while(!team2.name().compare(team1.name()) || !team2.hedgehog(0).Hat.compare(team1.hedgehog(0).Hat)); HWProto::addStringListToBuffer(teamscfg, - team2->TeamGameConfig(100)); + team2.teamGameConfig(100)); HWProto::addStringToBuffer(teamscfg, QString("eammloadt %1").arg(cDefaultAmmoStore->mid(0, cAmmoNumber))); HWProto::addStringToBuffer(teamscfg, QString("eammprob %1").arg(cDefaultAmmoStore->mid(cAmmoNumber, cAmmoNumber))); @@ -400,7 +398,7 @@ { QByteArray buf; foreach(HWTeam team, m_pTeamSelWidget->getPlayingTeams()) - HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(team.TeamName)); + HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(team.name())); RawSendIPC(buf); } }