equal
deleted
inserted
replaced
75 : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0) |
75 : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0) |
76 { |
76 { |
77 #ifdef USE_XFIRE |
77 #ifdef USE_XFIRE |
78 xfire_init(); |
78 xfire_init(); |
79 #endif |
79 #endif |
|
80 game = NULL; |
80 gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat); |
81 gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat); |
81 frontendEffects = gameSettings->value("frontend/effects", true).toBool(); |
82 frontendEffects = gameSettings->value("frontend/effects", true).toBool(); |
82 playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex()); |
83 playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex()); |
83 |
84 |
84 ui.setupUi(this); |
85 ui.setupUi(this); |
509 |
510 |
510 if(id == ID_PAGE_NETGAME) // joining a room |
511 if(id == ID_PAGE_NETGAME) // joining a room |
511 ui.pageNetGame->pChatWidget->loadLists(ui.pageOptions->editNetNick->text()); |
512 ui.pageNetGame->pChatWidget->loadLists(ui.pageOptions->editNetNick->text()); |
512 // joining the lobby |
513 // joining the lobby |
513 else if(id == ID_PAGE_ROOMSLIST) { |
514 else if(id == ID_PAGE_ROOMSLIST) { |
514 if ( game && game->gameState == gsStarted) { // abnormal exit - kick or room destruction - send kills. |
515 if ( hwnet && game && game->gameState == gsStarted) { // abnormal exit - kick or room destruction - send kills. |
515 game->KillAllTeams(); |
516 game->KillAllTeams(); |
516 } |
517 } |
517 ui.pageRoomsList->chatWidget->loadLists(ui.pageOptions->editNetNick->text()); |
518 ui.pageRoomsList->chatWidget->loadLists(ui.pageOptions->editNetNick->text()); |
518 } |
519 } |
519 } |
520 } |