QTfrontend/hwform.cpp
changeset 8709 191bd86f97a1
parent 8643 e4d1c21f8db0
child 8716 e09633d10f16
equal deleted inserted replaced
8708:6354b01d5500 8709:191bd86f97a1
   992     game->PlayDemo(curritem->data(Qt::UserRole).toString(), ui.pagePlayDemo->isSave());
   992     game->PlayDemo(curritem->data(Qt::UserRole).toString(), ui.pagePlayDemo->isSave());
   993 }
   993 }
   994 
   994 
   995 void HWForm::PlayDemoQuick(const QString & demofilename)
   995 void HWForm::PlayDemoQuick(const QString & demofilename)
   996 {
   996 {
   997     if (game && game->gameState == gsStarted) return;
       
   998     GoBack(); //needed to cleanly disconnect from netgame
       
   999     GoToPage(ID_PAGE_MAIN);
   997     GoToPage(ID_PAGE_MAIN);
       
   998     //GoBack() <- don't or you'll close the socket
  1000     CreateGame(0, 0, 0);
   999     CreateGame(0, 0, 0);
  1001     game->PlayDemo(demofilename, false);
  1000     game->PlayDemo(demofilename, false);
  1002 }
  1001 }
  1003 
  1002 
  1004 void HWForm::NetConnectServer(const QString & host, quint16 port)
  1003 void HWForm::NetConnectServer(const QString & host, quint16 port)