QTfrontend/net/newnetclient.cpp
changeset 14906 8b5d06749026
parent 14903 5119203470f3
child 15417 5fcdc072d706
equal deleted inserted replaced
14905:6b591186ab10 14906:8b5d06749026
   799         return;
   799         return;
   800     }
   800     }
   801 
   801 
   802     if(netClientState == InLobby && lst[0] == "REPLAY_START")
   802     if(netClientState == InLobby && lst[0] == "REPLAY_START")
   803     {
   803     {
   804         if(lst.size() < 2 || lst[1] != mynick)
   804         netClientState = InRoom;
   805         {
   805         m_demo_data_pending = true;
   806             qWarning("Net: Bad REPLAY_START message");
   806         emit EnteredGame();
   807             return;
   807         emit roomMaster(false);
   808         }
       
   809 
       
   810         for(int i = 1; i < lst.size(); ++i)
       
   811         {
       
   812             if (lst[i] == mynick)
       
   813             {
       
   814                 netClientState = InRoom;
       
   815                 m_demo_data_pending = true;
       
   816                 emit EnteredGame();
       
   817                 emit roomMaster(false);
       
   818             }
       
   819         }
       
   820         return;
   808         return;
   821     }
   809     }
   822 
   810 
   823     if(netClientState == InRoom || netClientState == InGame || netClientState == InDemo)
   811     if(netClientState == InRoom || netClientState == InGame || netClientState == InDemo)
   824     {
   812     {