QTfrontend/game.cpp
changeset 596 38bdde6a54c1
parent 595 5ee863f2f568
child 601 78a68cc4d846
--- a/QTfrontend/game.cpp	Sat Sep 15 13:01:44 2007 +0000
+++ b/QTfrontend/game.cpp	Tue Sep 18 18:24:02 2007 +0000
@@ -139,11 +139,18 @@
 	HWProto::addStringListToBuffer(teamscfg,
 			team2.TeamGameConfig(100));
 
-//	HWProto::addStringToBuffer(teamscfg, "eaddtrig 2147483649");
-	HWProto::addStringToBuffer(teamscfg, "eaddtrig s2147483649 1 1 33 1100 -100 1");
-	HWProto::addStringToBuffer(teamscfg, "eaddtrig s1 1 1 33 1200 -100 2");
-	HWProto::addStringToBuffer(teamscfg, "eaddtrig s2 1 1 33 1300 -100 3");
-	HWProto::addStringToBuffer(teamscfg, "eaddtrig s3 1 1 33 1400 -100 0");
+	QFile file(datadir->absolutePath() + "/Trainings/001_Shotgun.txt");
+	if(!file.open(QFile::ReadOnly))
+	{
+		emit ErrorMessage(tr("Error reading training config file"));
+		return;
+	}
+	
+	QTextStream stream(&file);
+	while(!stream.atEnd())
+	{
+		HWProto::addStringToBuffer(teamscfg, stream.readLine());
+	}
 
 	RawSendIPC(teamscfg);
 }