summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-07-30 10:44:58 +0000
committerrubidium <rubidium@openttd.org>2011-07-30 10:44:58 +0000
commit36e887591bde9e7358b8dc5827cb4a1e9f332006 (patch)
treeb76c63edb7cf335e22ed6f7e473ae952f6d464f1
parent289133be148788a19a965f807e7b824c4d26f872 (diff)
downloadopenttd-36e887591bde9e7358b8dc5827cb4a1e9f332006.tar.xz
(svn r22696) -Fix: don't requery the servers when the server list window isn't opened
-rw-r--r--src/network/network.cpp1
-rw-r--r--src/network/network_gui.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index d3f771c8e..f2f1486d5 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -837,7 +837,6 @@ void NetworkUDPGameLoop()
} else {
_udp_client_socket->ReceivePackets();
if (_network_udp_broadcast > 0) _network_udp_broadcast--;
- NetworkGameListRequery();
}
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 305394ba2..e82d162df 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -889,6 +889,11 @@ public:
this->vscroll->SetCapacityFromWidget(this, NGWW_MATRIX);
this->GetWidget<NWidgetCore>(NGWW_MATRIX)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
+
+ virtual void OnTick()
+ {
+ NetworkGameListRequery();
+ }
};
Listing NetworkGameWindow::last_sorting = {false, 5};