--- a/QTfrontend/ui/widget/gamecfgwidget.cpp Fri Oct 21 19:37:45 2011 +0200
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Fri Oct 21 20:58:49 2011 +0200
@@ -28,6 +28,7 @@
#include "gamecfgwidget.h"
#include "igbox.h"
+#include "HWDataManager.h"
#include "hwconsts.h"
#include "ammoSchemeModel.h"
#include "proto.h"
@@ -62,9 +63,8 @@
QString script = (*scriptList)[i].remove(".lua", Qt::CaseInsensitive);
QList<QVariant> scriptInfo;
scriptInfo.push_back(script);
- QFile scriptCfgFile;
- scriptCfgFile.setFileName(QString("%1/Data/Scripts/Multiplayer/%2.cfg").arg(cfgdir->absolutePath()).arg(script));
- if (!scriptCfgFile.exists()) scriptCfgFile.setFileName(QString("%1/Scripts/Multiplayer/%2.cfg").arg(datadir->absolutePath()).arg(script));
+ QFile scriptCfgFile(HWDataManager::instance().findFileForRead(
+ QString("Scripts/Multiplayer/%2.cfg").arg(script)));
if (scriptCfgFile.exists() && scriptCfgFile.open(QFile::ReadOnly)) {
QString scheme;
QString weapons;