QTfrontend/hwform.cpp
changeset 636 dc93ac775bb9
parent 635 0fb6d55ecd66
child 637 8fa7ed5e13bd
equal deleted inserted replaced
635:0fb6d55ecd66 636:dc93ac775bb9
    28 #include <QPushButton>
    28 #include <QPushButton>
    29 #include <QListWidget>
    29 #include <QListWidget>
    30 #include <QStackedLayout>
    30 #include <QStackedLayout>
    31 #include <QLineEdit>
    31 #include <QLineEdit>
    32 #include <QLabel>
    32 #include <QLabel>
       
    33 #include <QRadioButton>
    33 
    34 
    34 #include "hwform.h"
    35 #include "hwform.h"
    35 #include "game.h"
    36 #include "game.h"
    36 #include "team.h"
    37 #include "team.h"
    37 #include "teamselect.h"
    38 #include "teamselect.h"
   400 void HWForm::NetStartServer()
   401 void HWForm::NetStartServer()
   401 {
   402 {
   402   pnetserver = new HWNetServer;
   403   pnetserver = new HWNetServer;
   403   pnetserver->StartServer();
   404   pnetserver->StartServer();
   404   _NetConnect("localhost", pnetserver->getRunningPort(), ui.pageNet->editNetNick->text());
   405   _NetConnect("localhost", pnetserver->getRunningPort(), ui.pageNet->editNetNick->text());
   405   pRegisterServer = new HWNetWwwServer(0, "hedgewars server", 46631);
   406 
       
   407   if (ui.pageNet->rbLocalGame->isChecked())
       
   408     pRegisterServer = new HWNetUdpServer(0, "hedgewars server", 46631);
       
   409   else
       
   410     pRegisterServer = new HWNetWwwServer(0, "hedgewars server", 46631);
   406 }
   411 }
   407 
   412 
   408 void HWForm::NetDisconnect()
   413 void HWForm::NetDisconnect()
   409 {
   414 {
   410   if(hwnet) {
   415   if(hwnet) {