QTfrontend/game.cpp
changeset 9466 8b48c27201af
parent 9249 7b8c82785145
child 9521 8054d9d775fd
child 9718 563a34cd8398
--- a/QTfrontend/game.cpp	Sat Sep 21 23:54:57 2013 +0400
+++ b/QTfrontend/game.cpp	Fri Sep 27 00:54:18 2013 +0400
@@ -89,18 +89,6 @@
     SetGameState(gsStopped);
 }
 
-void HWGame::addKeyBindings(QByteArray * buf)
-{
-    for(int i = 0; i < BINDS_NUMBER; i++)
-    {
-        QString value = config->value(QString("Binds/%1").arg(cbinds[i].action), cbinds[i].strbind).toString();
-        if (value.isEmpty() || value == "default") continue;
-
-        QString bind = QString("edbind " + value + " " + cbinds[i].action);
-        HWProto::addStringToBuffer(*buf, bind);
-    }
-}
-
 void HWGame::commonConfig()
 {
     QByteArray buf;
@@ -118,8 +106,6 @@
     }
     HWProto::addStringToBuffer(buf, gt);
 
-    addKeyBindings(&buf);
-
     buf += gamecfg->getFullConfig();
 
     if (m_pTeamSelWidget)
@@ -132,7 +118,7 @@
             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
             if(gamecfg->schemeData(15).toBool() || !gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
             HWProto::addStringListToBuffer(buf,
-                                           team.teamGameConfig(gamecfg->getInitHealth(), config));
+                                           team.teamGameConfig(gamecfg->getInitHealth()));
             ;
         }
     }
@@ -150,8 +136,6 @@
     QByteArray teamscfg;
     ThemeModel * themeModel = DataManager::instance().themeModel();
 
-    addKeyBindings(&teamscfg);
-
     HWProto::addStringToBuffer(teamscfg, "TL");
     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
                                .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data(ThemeModel::ActualNameRole).toString() : "steel"));
@@ -165,7 +149,7 @@
     team1.setNumHedgehogs(4);
     HWNamegen::teamRandomNames(team1,true);
     HWProto::addStringListToBuffer(teamscfg,
-                                   team1.teamGameConfig(100, config));
+                                   team1.teamGameConfig(100));
 
     HWTeam team2;
     team2.setDifficulty(4);
@@ -175,7 +159,7 @@
         HWNamegen::teamRandomNames(team2,true);
     while(!team2.name().compare(team1.name()) || !team2.hedgehog(0).Hat.compare(team1.hedgehog(0).Hat));
     HWProto::addStringListToBuffer(teamscfg,
-                                   team2.teamGameConfig(100, config));
+                                   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)));
@@ -194,8 +178,6 @@
     HWProto::addStringToBuffer(traincfg, "eseed " + QUuid::createUuid().toString());
     HWProto::addStringToBuffer(traincfg, "escript " + training);
 
-    addKeyBindings(&traincfg);
-
     RawSendIPC(traincfg);
 }
 
@@ -207,8 +189,6 @@
 
     HWProto::addStringToBuffer(campaigncfg, "escript " + campaignScript);
 
-    addKeyBindings(&campaigncfg);
-
     RawSendIPC(campaigncfg);
 }