Don't show AI-controlled teams in campaigns page
authorWuzzy <almikes@aol.com>
Wed, 04 May 2016 09:19:44 +0200
changeset 11964 3c15903256a7
parent 11963 de66192866d3
child 11965 c933f2257020
Don't show AI-controlled teams in campaigns page
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Wed May 04 08:44:53 2016 +0200
+++ b/QTfrontend/hwform.cpp	Wed May 04 09:19:44 2016 +0200
@@ -466,7 +466,16 @@
     ui.pageOptions->CBTeamName->clear();
     ui.pageOptions->CBTeamName->addItems(teamslist);
     ui.pageCampaign->CBTeam->clear();
-    ui.pageCampaign->CBTeam->addItems(teamslist);
+    /* Only show human teams in campaign page */
+    for(int i=0; i<teamslist.length(); i++)
+    {
+        HWTeam testTeam = HWTeam(teamslist[i]);
+        testTeam.loadFromFile();
+        if(testTeam.difficulty() == 0)
+        {
+            ui.pageCampaign->CBTeam->addItem(teamslist[i]);
+        }
+    }
 }
 
 void HWForm::GoToSelectNewWeapon()