This should make frontend aware of your own teams in game on rejoin
authorunc0rr
Mon, 25 Aug 2014 00:11:19 +0400
changeset 10400 47e2189eae44
parent 10399 22fbc79acd5b
child 10401 c31276023295
This should make frontend aware of your own teams in game on rejoin
QTfrontend/net/newnetclient.cpp
QTfrontend/team.cpp
QTfrontend/team.h
--- a/QTfrontend/net/newnetclient.cpp	Sun Aug 24 23:53:33 2014 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Mon Aug 25 00:11:19 2014 +0400
@@ -748,7 +748,9 @@
             }
             QStringList tmp = lst;
             tmp.removeFirst();
-            emit AddNetTeam(tmp);
+            HWTeam team(tmp);
+            team.setNetTeam(team.owner() != mynick);
+            emit AddNetTeam(team);
             return;
         }
 
--- a/QTfrontend/team.cpp	Sun Aug 24 23:53:33 2014 +0400
+++ b/QTfrontend/team.cpp	Mon Aug 25 00:11:19 2014 +0400
@@ -291,6 +291,12 @@
     return sl;
 }
 
+
+void HWTeam::setNetTeam(bool isNetTeam)
+{
+    m_isNetTeam = isNetTeam;
+}
+
 bool HWTeam::isNetTeam() const
 {
     return m_isNetTeam;
@@ -444,3 +450,4 @@
 {
     m_wins++;
 }
+
--- a/QTfrontend/team.h	Sun Aug 24 23:53:33 2014 +0400
+++ b/QTfrontend/team.h	Mon Aug 25 00:11:19 2014 +0400
@@ -89,6 +89,7 @@
         void setName(const QString & name);
         void setNumHedgehogs(unsigned char num);
         void setVoicepack(const QString & voicepack);
+        void setNetTeam(bool isNetTeam);
 
         // increments for statistical info
         void incRounds();