Auto refresh room list after leaving room. Fixes issue #320 for voluntarily and involuntarily coming to room list.
authorblackmetalowiec
Wed, 07 Dec 2011 12:19:36 +0100
changeset 6513 677b96d13e1f
parent 6512 0df7f6697939
child 6514 8ba891d34eba
Auto refresh room list after leaving room. Fixes issue #320 for voluntarily and involuntarily coming to room list.
QTfrontend/net/newnetclient.cpp
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/FrontendDataUtils.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/GameMode.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Grave.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Map.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Scheme.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Team.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Weapon.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/UserInput/TouchInterface.java
share/hedgewars/Data/Scripts/plist/Racer.plist
--- a/QTfrontend/net/newnetclient.cpp	Wed Dec 07 08:01:18 2011 +0300
+++ b/QTfrontend/net/newnetclient.cpp	Wed Dec 07 12:19:36 2011 +0100
@@ -376,12 +376,14 @@
 
     if(lst[0] == "ROOMABANDONED") {
         netClientState = InLobby;
+        askRoomsList();
         emit LeftRoom(tr("Room destroyed"));
         return;
     }
 
     if(lst[0] == "KICKED") {
         netClientState = InLobby;
+        askRoomsList();
         emit LeftRoom(tr("You got kicked"));
         return;
     }
@@ -746,6 +748,7 @@
 {
     netClientState = InLobby;
     RawSendNet(QString("PART"));
+    askRoomsList();
 }
 
 bool HWNewNet::isInRoom()