QTfrontend/game.cpp
changeset 318 46a43b02bbb3
parent 312 c36d0b34ac3d
child 324 f4c109c82a0c
--- a/QTfrontend/game.cpp	Thu Jan 11 22:04:08 2007 +0000
+++ b/QTfrontend/game.cpp	Thu Jan 11 23:19:18 2007 +0000
@@ -54,18 +54,10 @@
 
 void HWGame::commonConfig()
 {
-	SendIPC(QString("eseed %1").arg(seed).toAscii());
-	try {
-	  QString currentMap=gamecfg->getCurrentMap();
-	  SendIPC((QString("emap ")+currentMap).toAscii());
-	  SendIPC(QString("etheme %1").arg(gamecfg->getCurrentTheme()).toAscii());
-	}
-	catch(const MapFileErrorException& e) {
-	  SendIPC(QString("etheme %1").arg(config->GetRandomTheme()).toAscii());
-	}
-	SendIPC("TL");
-	SendIPC(QString("e$gmflags %1").arg(gamecfg->getGameFlags()).toAscii());
-	SendIPC(QString("e$turntime %1").arg(gamecfg->getTurnTime() * 1000).toAscii());
+	QByteArray buf;
+	HWProto::addStringListToBuffer(buf, gamecfg->getFullConfig());
+	HWProto::addStringToBuffer(buf, "TL");
+	RawSendIPC(buf);
 }
 
 void HWGame::SendConfig()