# HG changeset patch # User unc0rr # Date 1223829913 0 # Node ID 4004e597f1bf477df8faafd6a57da1a3ed4c927e # Parent 7a47a80b20ad906ab94fa0d269c797fc1de8b749 Clients send roundfinished message to server when the round is over diff -r 7a47a80b20ad -r 4004e597f1bf QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Sun Oct 12 16:31:23 2008 +0000 +++ b/QTfrontend/hwform.cpp Sun Oct 12 16:45:13 2008 +0000 @@ -581,6 +581,7 @@ GoBack(); Music(ui.pageOptions->CBEnableMusic->isChecked()); GoToPage(ID_PAGE_GAMESTATS); + if (hwnet) hwnet->gameFinished(); break; } default: { @@ -588,6 +589,7 @@ if (id == ID_PAGE_INGAME) { GoBack(); Music(ui.pageOptions->CBEnableMusic->isChecked()); + if (hwnet) hwnet->gameFinished(); } }; } diff -r 7a47a80b20ad -r 4004e597f1bf QTfrontend/newnetclient.cpp --- a/QTfrontend/newnetclient.cpp Sun Oct 12 16:31:23 2008 +0000 +++ b/QTfrontend/newnetclient.cpp Sun Oct 12 16:45:13 2008 +0000 @@ -491,3 +491,8 @@ { return isChief; } + +void HWNewNet::gameFinished() +{ + RawSendNet(QString("ROUNDFINISHED")); +} diff -r 7a47a80b20ad -r 4004e597f1bf QTfrontend/newnetclient.h --- a/QTfrontend/newnetclient.h Sun Oct 12 16:31:23 2008 +0000 +++ b/QTfrontend/newnetclient.h Sun Oct 12 16:45:13 2008 +0000 @@ -125,6 +125,7 @@ void JoinRoom(const QString & room); void CreateRoom(const QString & room); void askRoomsList(); + void gameFinished(); private slots: void ClientRead(); diff -r 7a47a80b20ad -r 4004e597f1bf netserver/HWProto.hs --- a/netserver/HWProto.hs Sun Oct 12 16:31:23 2008 +0000 +++ b/netserver/HWProto.hs Sun Oct 12 16:45:13 2008 +0000 @@ -218,6 +218,9 @@ else (noChangeClients, noChangeRooms, answerRunGame) +handleCmd_inRoom client _ _ ["ROUNDFINISHED"] = + (noChangeClients, noChangeRooms, []) + handleCmd_inRoom client _ _ ["GAMEMSG", msg] = (noChangeClients, noChangeRooms, [(othersInRoom, ["GAMEMSG", msg])])