[Dedicated] Optimize data transmission
This commit is contained in:
parent
f0db0f2114
commit
63c59b70c2
@ -382,19 +382,17 @@ namespace Components
|
|||||||
// Transmit custom data
|
// Transmit custom data
|
||||||
Scheduler::OnFrame([]()
|
Scheduler::OnFrame([]()
|
||||||
{
|
{
|
||||||
static std::uint64_t LastUpdate = 0;
|
static Utils::Time::Interval interval;
|
||||||
|
if (interval.elapsed(10s))
|
||||||
if ((GetTickCount64() - LastUpdate) > 10000)
|
|
||||||
{
|
{
|
||||||
|
interval.update();
|
||||||
|
|
||||||
CardTitles::SendCustomTitlesToClients();
|
CardTitles::SendCustomTitlesToClients();
|
||||||
Clantags::SendClantagsToClients();
|
Clantags::SendClantagsToClients();
|
||||||
|
|
||||||
LastUpdate = GetTickCount64();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
#ifdef USE_LEGACY_SERVER_LIST
|
#ifdef USE_LEGACY_SERVER_LIST
|
||||||
|
|
||||||
// Heartbeats
|
// Heartbeats
|
||||||
Scheduler::OnFrame([] ()
|
Scheduler::OnFrame([] ()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user