get rid of that annoying 'Invalid state: in Lobby' message after room being closed or player being kicked from room. (the frontend always tried to leave the room he already left again)
authorsheepluva
Sun, 25 Sep 2011 20:54:51 +0200
changeset 6026 2833862a7e00
parent 6024 d38da7c19e43
child 6028 335eaf56d976
get rid of that annoying 'Invalid state: in Lobby' message after room being closed or player being kicked from room. (the frontend always tried to leave the room he already left again)
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Sun Sep 25 19:30:10 2011 +0200
+++ b/QTfrontend/hwform.cpp	Sun Sep 25 20:54:51 2011 +0200
@@ -549,7 +549,7 @@
             GoBack();
 
     if (curid == ID_PAGE_ROOMSLIST || curid == ID_PAGE_CONNECTING) NetDisconnect();
-    if (curid == ID_PAGE_NETGAME && hwnet) hwnet->partRoom();
+    if (curid == ID_PAGE_NETGAME && hwnet && hwnet.isInRoom()) hwnet->partRoom();
     // need to work on this, can cause invalid state for admin quit trying to prevent bad state message on kick
     //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom();