Fix team file path
authorunc0rr
Sun, 03 Mar 2013 23:25:34 +0400
changeset 8629 76a265f3967c
parent 8627 ea2d32a03ac9
child 8638 0a6837edb278
Fix team file path
QTfrontend/game.cpp
--- a/QTfrontend/game.cpp	Sun Mar 03 23:25:09 2013 +0400
+++ b/QTfrontend/game.cpp	Sun Mar 03 23:25:34 2013 +0400
@@ -352,7 +352,8 @@
     if(m_netSendBuffer.size())
     {
         emit SendNet(m_netSendBuffer);
-        
        m_netSendBuffer.clear();
+        
+        m_netSendBuffer.clear();
     }
 }
 
@@ -488,7 +489,7 @@
 void HWGame::sendCampaignVar(const QByteArray &varToSend)
 {
     QString varToFind(varToSend);
-    QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0);
+    QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(campaignTeam), QSettings::IniFormat, 0);
     teamfile.setIniCodec("UTF-8");
     QString varValue = teamfile.value("Campaign " + campaign + "/" + varToFind, "").toString();
     QByteArray command;
@@ -505,7 +506,7 @@
     QString varToWrite = QString::fromUtf8(varVal.left(i));
     QString varValue = QString::fromUtf8(varVal.mid(i + 1));
 
-    QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0);
+    QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(campaignTeam), QSettings::IniFormat, 0);
     teamfile.setIniCodec("UTF-8");
     teamfile.setValue("Campaign " + campaign + "/" + varToWrite, varValue);
 }