Changeset - r17887:8dfb20a2d652
[Not reviewed]
master
0 2 0
rubidium - 13 years ago 2011-07-30 10:44:58
rubidium@openttd.org
(svn r22696) -Fix: don't requery the servers when the server list window isn't opened
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/network/network.cpp
Show inline comments
 
@@ -834,13 +834,12 @@ void NetworkUDPGameLoop()
 
	if (_network_udp_server) {
 
		_udp_server_socket->ReceivePackets();
 
		_udp_master_socket->ReceivePackets();
 
	} else {
 
		_udp_client_socket->ReceivePackets();
 
		if (_network_udp_broadcast > 0) _network_udp_broadcast--;
 
		NetworkGameListRequery();
 
	}
 
}
 

	
 
/* The main loop called from ttd.c
 
 *  Here we also have to do StateGameLoop if needed! */
 
void NetworkGameLoop()
src/network/network_gui.cpp
Show inline comments
 
@@ -886,12 +886,17 @@ public:
 

	
 
	virtual void OnResize()
 
	{
 
		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};
 
GUIGameServerList::SortFunction * const NetworkGameWindow::sorter_funcs[] = {
 
	&NGameNameSorter,
 
	&NGameClientSorter,
0 comments (0 inline, 0 general)