Only emit roomNameUpdated when it actually is changed
authorunc0rr
Wed, 01 Jan 2014 23:41:49 +0400
changeset 9906 93c16a4b0c6a
parent 9904 ef3321c86912
child 9908 81eb25ddf594
Only emit roomNameUpdated when it actually is changed
QTfrontend/net/newnetclient.cpp
share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua
--- a/QTfrontend/net/newnetclient.cpp	Wed Jan 01 23:28:24 2014 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Wed Jan 01 23:41:49 2014 +0400
@@ -545,7 +545,7 @@
         m_roomsListModel->updateRoom(roomName, tmp);
 
         // keep track of room name so correct name is displayed
-        if(myroom == roomName)
+        if(myroom == roomName && myroom != tmp[1])
         {
             myroom = tmp[1];
             emit roomNameUpdated(myroom);
--- a/share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua	Wed Jan 01 23:28:24 2014 +0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua	Wed Jan 01 23:41:49 2014 +0400
@@ -1,4 +1,5 @@
 HedgewarsScriptLoad("/Scripts/Locale.lua")
+HedgewarsScriptLoad("/Scripts/Params.lua")
 
 local gravity = 100
 local wdGameTicks = 0
@@ -21,6 +22,7 @@
 end
 
 function onGameInit()
+    parseParams()
     gravity = ScriptParam
 end