- Revert try to add local team on rejoin
authorunc0rr
Mon, 25 Aug 2014 22:52:59 +0400
changeset 10401 c31276023295
parent 10400 47e2189eae44
child 10402 3313336c1ee0
child 10403 bc9433b33947
- Revert try to add local team on rejoin - Don't allow more than 8 teams in local game widget
QTfrontend/net/newnetclient.cpp
QTfrontend/ui/widget/frameTeam.cpp
QTfrontend/ui/widget/frameTeam.h
--- a/QTfrontend/net/newnetclient.cpp	Mon Aug 25 00:11:19 2014 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Mon Aug 25 22:52:59 2014 +0400
@@ -749,7 +749,6 @@
             QStringList tmp = lst;
             tmp.removeFirst();
             HWTeam team(tmp);
-            team.setNetTeam(team.owner() != mynick);
             emit AddNetTeam(team);
             return;
         }
--- a/QTfrontend/ui/widget/frameTeam.cpp	Mon Aug 25 00:11:19 2014 +0400
+++ b/QTfrontend/ui/widget/frameTeam.cpp	Mon Aug 25 22:52:59 2014 +0400
@@ -28,7 +28,7 @@
 #include "DataManager.h"
 
 FrameTeams::FrameTeams(QWidget* parent) :
-    QFrame(parent), maxHedgehogsPerGame(48), overallHedgehogs(0), mainLayout(this), nonInteractive(false)
+    QFrame(parent), mainLayout(this), nonInteractive(false)
 {
     QPalette newPalette = palette();
     newPalette.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
@@ -122,7 +122,7 @@
 
 bool FrameTeams::isFullTeams() const
 {
-    return overallHedgehogs==maxHedgehogsPerGame;
+    return teamToWidget.size() >= 8;
 }
 
 void FrameTeams::emitTeamColorChanged(const HWTeam& team)
--- a/QTfrontend/ui/widget/frameTeam.h	Mon Aug 25 00:11:19 2014 +0400
+++ b/QTfrontend/ui/widget/frameTeam.h	Mon Aug 25 22:52:59 2014 +0400
@@ -53,8 +53,6 @@
         void removeTeam(HWTeam team);
 
     private:
-        const int maxHedgehogsPerGame;
-        int overallHedgehogs;
         int currentColor;
 
         void emitTeamColorChanged(const HWTeam& team);