# HG changeset patch # User unc0rr # Date 1224071416 0 # Node ID a8dcdeb88a43fcba3c8a221b743369fecdd2c974 # Parent c72d37d4eb4ef87d3e93f0238b32991a0e82ac04 Various small insignificant improvements everywhere diff -r c72d37d4eb4e -r a8dcdeb88a43 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Tue Oct 14 14:35:52 2008 +0000 +++ b/QTfrontend/hwform.cpp Wed Oct 15 11:50:16 2008 +0000 @@ -257,7 +257,7 @@ void HWForm::OnPageShown(quint8 id, quint8 lastid) { - if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETCFG) { + if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) { QStringList tmNames = config->GetTeamsList(); TeamSelWidget* curTeamSelWidget; @@ -282,9 +282,6 @@ curTeamSelWidget->resetPlayingTeams(teamsList); } } - - if (id == ID_PAGE_ROOMSLIST && lastid == ID_PAGE_NETCFG) - GoBack(); } void HWForm::GoToPage(quint8 id) @@ -297,13 +294,15 @@ void HWForm::GoBack() { - if (!PagesStack.isEmpty() && PagesStack.top() == ID_PAGE_NET) { - if(hwnet || pnetserver) NetDisconnect(); - } quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop(); quint8 curid = ui.Pages->currentIndex(); ui.Pages->setCurrentIndex(id); OnPageShown(id, curid); + + if (id == ID_PAGE_ROOMSLIST) { + if(hwnet || pnetserver) NetDisconnect(); + GoBack(); + } } void HWForm::btnExitPressed() @@ -509,7 +508,7 @@ if(hwnet) { hwnet->Disconnect(); delete hwnet; - hwnet=0; + hwnet = 0; } if(pnetserver) { if (pRegisterServer) @@ -543,7 +542,7 @@ void HWForm::NetGameEnter() { - GoToPage(ID_PAGE_NETCFG); + GoToPage(ID_PAGE_NETGAME); } void HWForm::NetStartGame() diff -r c72d37d4eb4e -r a8dcdeb88a43 QTfrontend/hwform.h --- a/QTfrontend/hwform.h Tue Oct 14 14:35:52 2008 +0000 +++ b/QTfrontend/hwform.h Wed Oct 15 11:50:16 2008 +0000 @@ -99,7 +99,7 @@ ID_PAGE_MULTIPLAYER = 2, ID_PAGE_DEMOS = 3, ID_PAGE_NET = 4, - ID_PAGE_NETCFG = 5, + ID_PAGE_NETGAME = 5, ID_PAGE_INFO = 6, ID_PAGE_MAIN = 7, ID_PAGE_GAMESTATS = 8, diff -r c72d37d4eb4e -r a8dcdeb88a43 QTfrontend/newnetclient.cpp --- a/QTfrontend/newnetclient.cpp Tue Oct 14 14:35:52 2008 +0000 +++ b/QTfrontend/newnetclient.cpp Wed Oct 15 11:50:16 2008 +0000 @@ -53,8 +53,10 @@ void HWNewNet::Disconnect() { - m_game_connected = false; - NetSocket.disconnectFromHost(); + if (m_game_connected) + RawSendNet(QString("QUIT")); + m_game_connected = false; + NetSocket.disconnectFromHost(); } void HWNewNet::CreateRoom(const QString & room) @@ -158,7 +160,7 @@ { //emit ChangeInTeams(QStringList()); if(m_game_connected) emit Disconnected(); - m_game_connected=false; + m_game_connected = false; } void HWNewNet::displayError(QAbstractSocket::SocketError socketError) diff -r c72d37d4eb4e -r a8dcdeb88a43 hedgewars.kdevelop --- a/hedgewars.kdevelop Tue Oct 14 14:35:52 2008 +0000 +++ b/hedgewars.kdevelop Wed Oct 15 11:50:16 2008 +0000 @@ -213,7 +213,7 @@ false - + true false diff -r c72d37d4eb4e -r a8dcdeb88a43 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Tue Oct 14 14:35:52 2008 +0000 +++ b/hedgewars/uTeams.pas Wed Oct 15 11:50:16 2008 +0000 @@ -370,7 +370,9 @@ with TeamsArray[i]^ do begin AddChatString('* '+ TeamName + ' is gone'); - //for i:= 0 to cMaxHHIndex do Hedgehogs[i].Gear:= nil; + for i:= 0 to cMaxHHIndex do + with Hedgehogs[i] do + Gear^.State:= Gear^.State and not gstHHDriven; hasGone:= true end end; diff -r c72d37d4eb4e -r a8dcdeb88a43 netserver/HWProto.hs --- a/netserver/HWProto.hs Tue Oct 14 14:35:52 2008 +0000 +++ b/netserver/HWProto.hs Wed Oct 15 11:50:16 2008 +0000 @@ -122,7 +122,7 @@ else if roomPassword /= password clRoom then (noChangeClients, noChangeRooms, answerWrongPassword) else - (modifyClient client{room = roomName}, noChangeRooms, (answerJoined $ nick client) ++ answerNicks ++ answerFullConfig clRoom ++ answerAllTeams clRoom) + (modifyClient client{room = roomName}, noChangeRooms, answerNicks ++ (answerJoined $ nick client) ++ answerFullConfig clRoom ++ answerAllTeams clRoom) where noSuchRoom = isNothing $ find (\room -> roomName == name room) rooms answerNicks = [(clientOnly, ["JOINED"] ++ (map nick $ filter (\ci -> room ci == roomName) clients))]