Update to OpenTTD 1.9.0-beta2

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2019-02-13 15:17:23 +03:00
parent 42ec3bd611
commit 2bda8d4f34
1362 changed files with 22145 additions and 10644 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: network_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */
/* $Id$ */
/*
* This file is part of OpenTTD.
@@ -31,6 +31,7 @@
#include "../core/geometry_func.hpp"
#include "../genworld.h"
#include "../map_type.h"
#include "../guitimer_func.h"
#include "../widgets/network_widget.h"
@@ -234,6 +235,7 @@ protected:
Scrollbar *vscroll; ///< vertical scrollbar of the list of servers
QueryString name_editbox; ///< Client name editbox.
QueryString filter_editbox; ///< Editbox for filter on servers
GUITimer requery_timer; ///< Timer for network requery
int lock_offset; ///< Left offset for lock icon.
int blot_offset; ///< Left offset for green/yellow/red compatibility icon.
@@ -480,6 +482,8 @@ public:
this->server = this->last_joined;
if (this->last_joined != NULL) NetworkUDPQueryServer(this->last_joined->address);
this->requery_timer.SetInterval(MILLISECONDS_PER_TICK);
this->servers.SetListing(this->last_sorting);
this->servers.SetSortFuncs(this->sorter_funcs);
this->servers.SetFilterFuncs(this->filter_funcs);
@@ -903,8 +907,11 @@ public:
this->vscroll->SetCapacityFromWidget(this, WID_NG_MATRIX);
}
virtual void OnTick()
virtual void OnRealtimeTick(uint delta_ms)
{
if (!this->requery_timer.Elapsed(delta_ms)) return;
this->requery_timer.SetInterval(MILLISECONDS_PER_TICK);
NetworkGameListRequery();
}
};