Make finding the sv_lan ConVar a static operation (#2258)

Co-authored-by: Malifox <78408070+Maliwolf@users.noreply.github.com>
(cherry picked from commit 25faf18760)
This commit is contained in:
Malifox 2025-02-10 10:47:11 -05:00 committed by Nicholas Hastings
parent b4cb8789fa
commit 8f921d971d

View File

@ -57,7 +57,6 @@ typedef ICommandLine *(*FakeGetCommandLine)();
#define VSTDLIB_NAME FORMAT_SOURCE_BIN_NAME("vstdlib")
CHalfLife2 g_HL2;
ConVar *sv_lan = NULL;
static void *g_EntList = NULL;
static void **g_pEntInfoList = NULL;
@ -787,7 +786,7 @@ void CHalfLife2::ProcessFakeCliCmdQueue()
bool CHalfLife2::IsLANServer()
{
sv_lan = icvar->FindVar("sv_lan");
static ConVar *sv_lan = icvar->FindVar("sv_lan");
if (!sv_lan)
{