merge for the win
authorkoda
Mon, 04 Mar 2013 10:33:30 +0100
changeset 8638 0a6837edb278
parent 8637 bf63104605fe (current diff)
parent 8629 76a265f3967c (diff)
child 8639 33d29ed99faa
merge for the win
--- a/QTfrontend/game.cpp	Mon Mar 04 10:33:08 2013 +0100
+++ b/QTfrontend/game.cpp	Mon Mar 04 10:33:30 2013 +0100
@@ -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);
 }
--- a/gameServer/HWProtoInRoomState.hs	Mon Mar 04 10:33:08 2013 +0100
+++ b/gameServer/HWProtoInRoomState.hs	Mon Mar 04 10:33:30 2013 +0100
@@ -305,14 +305,14 @@
     let kickId = fromJust maybeClientId
     let kickCl = rnc `client` kickId
     let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId
-    let notOnly2Clans = (length . group . sort . map teamcolor . teams $ rm) > 2
+    let notOnly2Players = (length . group . sort . map teamowner . teams $ rm) > 2
     return
         [KickRoomClient kickId |
             master
             && isJust maybeClientId
             && (kickId /= thisClientId)
             && sameRoom
-            && ((isNothing $ gameInfo rm) || notOnly2Clans || teamsInGame kickCl == 0)
+            && ((isNothing $ gameInfo rm) || notOnly2Players || teamsInGame kickCl == 0)
         ]