diff -r 2113296b7a29 -r 4b678aad50e9 QTfrontend/game.cpp --- a/QTfrontend/game.cpp Wed Dec 19 05:50:02 2018 +0100 +++ b/QTfrontend/game.cpp Wed Dec 19 19:10:42 2018 +0100 @@ -29,6 +29,8 @@ #include "hwform.h" #include "ui/page/pageoptions.h" +#include "ui/page/pagetraining.h" +#include "ui/page/pagecampaign.h" #include "game.h" #include "hwconsts.h" #include "gameuiconfig.h" @@ -183,6 +185,14 @@ { QByteArray traincfg; HWProto::addStringToBuffer(traincfg, "TL"); + + HWTeam missionTeam = HWTeam(); + missionTeam.setName(config->Form->ui.pageTraining->CBTeam->currentText()); + missionTeam.loadFromFile(); + missionTeam.setNumHedgehogs(HEDGEHOGS_PER_TEAM); + missionTeam.setMissionTeam(true); + HWProto::addStringListToBuffer(traincfg, missionTeam.teamGameConfig(100)); + HWProto::addStringToBuffer(traincfg, "eseed " + QUuid::createUuid().toString()); HWProto::addStringToBuffer(traincfg, "escript " + trainingScript); @@ -193,8 +203,15 @@ { QByteArray campaigncfg; HWProto::addStringToBuffer(campaigncfg, "TL"); + + HWTeam missionTeam = HWTeam(); + missionTeam.setName(config->Form->ui.pageCampaign->CBTeam->currentText()); + missionTeam.loadFromFile(); + missionTeam.setNumHedgehogs(HEDGEHOGS_PER_TEAM); + missionTeam.setMissionTeam(true); + HWProto::addStringListToBuffer(campaigncfg, missionTeam.teamGameConfig(100)); + HWProto::addStringToBuffer(campaigncfg, "eseed " + QUuid::createUuid().toString()); - HWProto::addStringToBuffer(campaigncfg, "escript " + campaignScript); RawSendIPC(campaigncfg);