QTfrontend/net/newnetclient.cpp
changeset 8021 095d5ff3d39b
parent 7834 3a65b70b1285
child 8103 c247346d296f
child 8157 695f1eef72c8
--- a/QTfrontend/net/newnetclient.cpp	Tue Nov 13 13:50:04 2012 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Wed Nov 14 14:31:17 2012 +0400
@@ -380,11 +380,13 @@
         {
             flags.remove(0, 1);
             char c = flags[0].toAscii();
+            bool inRoom = (netClientState == InRoom || netClientState == InGame);
 
             switch(c)
             {
                 // flag indicating if a player is ready to start a game
                 case 'r':
+                    if(inRoom)
                         foreach (const QString & nick, nicks)
                         {
                             if (nick == mynick)
@@ -401,14 +403,16 @@
                         foreach(const QString & nick, nicks)
                             m_playersModel->setFlag(nick, PlayersListModel::Registered, setFlag);
                         break;
-
+                // flag indicating if a player has engine running
                 case 'g':
+                    if(inRoom)
                         foreach(const QString & nick, nicks)
                             m_playersModel->setFlag(nick, PlayersListModel::InGame, setFlag);
                         break;
 
                 // flag indicating if a player is the host/master of the room
                 case 'h':
+                    if(inRoom)
                         foreach (const QString & nick, nicks)
                         {
                             if (nick == mynick)