QTfrontend/game.cpp
changeset 6024 d38da7c19e43
parent 6015 daffc14a518a
child 6211 ee9465c0ea82
equal deleted inserted replaced
6022:8ed6e810051a 6024:d38da7c19e43
   118     HWProto::addStringToBuffer(teamscfg, "TL");
   118     HWProto::addStringToBuffer(teamscfg, "TL");
   119     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
   119     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
   120             .arg((themesModel->rowCount() > 0) ? themesModel->index(rand() % themesModel->rowCount()).data().toString() : "steel"));
   120             .arg((themesModel->rowCount() > 0) ? themesModel->index(rand() % themesModel->rowCount()).data().toString() : "steel"));
   121     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
   121     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
   122 
   122 
   123     HWNamegen namegen;
       
   124 
       
   125     HWTeam team1;
   123     HWTeam team1;
   126     team1.setDifficulty(0);
   124     team1.setDifficulty(0);
   127     team1.setColor(QColor(colors[0]));
   125     team1.setColor(QColor(colors[0]));
   128     team1.setNumHedgehogs(4);
   126     team1.setNumHedgehogs(4);
   129     namegen.teamRandomNames(team1,TRUE);
   127     HWNamegen::teamRandomNames(team1,true);
   130     HWProto::addStringListToBuffer(teamscfg,
   128     HWProto::addStringListToBuffer(teamscfg,
   131             team1.teamGameConfig(100));
   129             team1.teamGameConfig(100));
   132 
   130 
   133     HWTeam team2;
   131     HWTeam team2;
   134     team2.setDifficulty(4);
   132     team2.setDifficulty(4);
   135     team2.setColor(QColor(colors[1]));
   133     team2.setColor(QColor(colors[1]));
   136     team2.setNumHedgehogs(4);
   134     team2.setNumHedgehogs(4);
   137     do
   135     do
   138         namegen.teamRandomNames(team2,TRUE);
   136         HWNamegen::teamRandomNames(team2,true);
   139     while(!team2.name().compare(team1.name()) || !team2.hedgehog(0).Hat.compare(team1.hedgehog(0).Hat));
   137     while(!team2.name().compare(team1.name()) || !team2.hedgehog(0).Hat.compare(team1.hedgehog(0).Hat));
   140     HWProto::addStringListToBuffer(teamscfg,
   138     HWProto::addStringListToBuffer(teamscfg,
   141             team2.teamGameConfig(100));
   139             team2.teamGameConfig(100));
   142 
   140 
   143     HWProto::addStringToBuffer(teamscfg, QString("eammloadt %1").arg(cDefaultAmmoStore->mid(0, cAmmoNumber)));
   141     HWProto::addStringToBuffer(teamscfg, QString("eammloadt %1").arg(cDefaultAmmoStore->mid(0, cAmmoNumber)));