From cf824aa2fcf1ca18ececbe0219cb5f9d2b38f201 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 14 Aug 2022 16:00:40 +0200 Subject: [PATCH] Remove FCVAR_DEVELOPMENTONLY from 'origin_disconnectWhenOffline' Allow 100% offline play in retail mode. --- r5dev/tier1/IConVar.cpp | 4 ++++ r5dev/tier1/cvar.cpp | 2 ++ r5dev/tier1/cvar.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/r5dev/tier1/IConVar.cpp b/r5dev/tier1/IConVar.cpp index 4e5ee157..f4144ec7 100644 --- a/r5dev/tier1/IConVar.cpp +++ b/r5dev/tier1/IConVar.cpp @@ -230,6 +230,9 @@ void ConVar::InitShipped(void) const stream_overlay_mode = g_pCVar->FindVar("stream_overlay_mode"); sv_visualizetraces = g_pCVar->FindVar("sv_visualizetraces"); old_gather_props = g_pCVar->FindVar("old_gather_props"); +#ifndef DEDICATED + origin_disconnectWhenOffline = g_pCVar->FindVar("origin_disconnectWhenOffline"); +#endif // !DEDICATED mp_gamemode = g_pCVar->FindVar("mp_gamemode"); hostname = g_pCVar->FindVar("hostname"); hostip = g_pCVar->FindVar("hostip"); @@ -243,6 +246,7 @@ void ConVar::InitShipped(void) const #ifndef DEDICATED cl_threaded_bone_setup->RemoveFlags(FCVAR_DEVELOPMENTONLY); rui_defaultDebugFontFace->RemoveFlags(FCVAR_DEVELOPMENTONLY); + origin_disconnectWhenOffline->RemoveFlags(FCVAR_DEVELOPMENTONLY); #endif // !DEDICATED mp_gamemode->RemoveChangeCallback(mp_gamemode->m_fnChangeCallbacks[0]); mp_gamemode->InstallChangeCallback(MP_GameMode_Changed_f, false); diff --git a/r5dev/tier1/cvar.cpp b/r5dev/tier1/cvar.cpp index fd55b4c5..975d192f 100644 --- a/r5dev/tier1/cvar.cpp +++ b/r5dev/tier1/cvar.cpp @@ -133,6 +133,8 @@ ConVar* con_suggestion_limit = nullptr; ConVar* con_suggestion_showhelptext = nullptr; ConVar* con_suggestion_showflags = nullptr; ConVar* con_suggestion_flags_realtime = nullptr; + +ConVar* origin_disconnectWhenOffline = nullptr; #endif // !DEDICATED //----------------------------------------------------------------------------- // FILESYSTEM | diff --git a/r5dev/tier1/cvar.h b/r5dev/tier1/cvar.h index d6ab5076..aa22883e 100644 --- a/r5dev/tier1/cvar.h +++ b/r5dev/tier1/cvar.h @@ -128,6 +128,8 @@ extern ConVar* con_suggestion_limit; extern ConVar* con_suggestion_showhelptext; extern ConVar* con_suggestion_showflags; extern ConVar* con_suggestion_flags_realtime; + +extern ConVar* origin_disconnectWhenOffline; #endif // !DEDICATED //------------------------------------------------------------------------- // FILESYSTEM |