mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
remove useless dvar lookup
This commit is contained in:
parent
1d00bbce5c
commit
3a7d9018e1
@ -17,6 +17,8 @@ namespace dedicated
|
||||
utils::hook::detour gscr_set_dynamic_dvar_hook;
|
||||
utils::hook::detour com_quit_f_hook;
|
||||
|
||||
const game::dvar_t* sv_lanOnly;
|
||||
|
||||
void init_dedicated_server()
|
||||
{
|
||||
static bool initialized = false;
|
||||
@ -29,8 +31,7 @@ namespace dedicated
|
||||
|
||||
void send_heartbeat()
|
||||
{
|
||||
auto* const dvar = game::Dvar_FindVar("sv_lanOnly");
|
||||
if (dvar && dvar->current.enabled)
|
||||
if (sv_lanOnly->current.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -175,11 +176,9 @@ namespace dedicated
|
||||
return;
|
||||
}
|
||||
|
||||
// Register dedicated dvar
|
||||
game::Dvar_RegisterBool("dedicated", true, game::DVAR_FLAG_READ, "Dedicated server");
|
||||
|
||||
// Add lanonly mode
|
||||
game::Dvar_RegisterBool("sv_lanOnly", false, game::DVAR_FLAG_NONE, "Don't send heartbeat");
|
||||
sv_lanOnly = game::Dvar_RegisterBool("sv_lanOnly", false, game::DVAR_FLAG_NONE, "Don't send heartbeat");
|
||||
|
||||
// Disable VirtualLobby
|
||||
dvars::override::Dvar_RegisterBool("virtualLobbyEnabled", false, game::DVAR_FLAG_NONE | game::DVAR_FLAG_READ);
|
||||
|
Loading…
Reference in New Issue
Block a user