[Dedicated] Actually fix sv_lanOnly
This commit is contained in:
parent
d28dc6ecc4
commit
219a10d6a0
@ -253,8 +253,14 @@ namespace Components
|
||||
|
||||
void Dedicated::Heartbeat()
|
||||
{
|
||||
int masterPort = Dvar::Var("masterPort").get<int>();
|
||||
const char* masterServerName = Dvar::Var("masterServerName").get<const char*>();
|
||||
// Do not send a heartbeat if sv_lanOnly is set to true
|
||||
if (Dedicated::SVLanOnly.get<bool>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto masterPort = Dvar::Var("masterPort").get<int>();
|
||||
const auto* masterServerName = Dvar::Var("masterServerName").get<const char*>();
|
||||
|
||||
Network::Address master(Utils::String::VA("%s:%u", masterServerName, masterPort));
|
||||
|
||||
@ -386,12 +392,6 @@ namespace Components
|
||||
{
|
||||
static Utils::Time::Interval interval;
|
||||
|
||||
// Do not send an heartbeat if sv_lanOnly is set to true
|
||||
if (Dedicated::SVLanOnly.get<bool>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Dvar::Var("sv_maxclients").get<int>() > 0 && interval.elapsed(2min))
|
||||
{
|
||||
interval.update();
|
||||
|
Loading…
Reference in New Issue
Block a user