Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB

5 years ago
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "client_pch.h"
#include "cl_localnetworkbackdoor.h"
#include "LocalNetworkBackdoor.h"
#include "iclientnetworkable.h"
#include "basehandle.h"
#include "client_class.h"
#include "dt_localtransfer.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
static CLocalNetworkBackdoor s_LocalNetworkBackdoor;
void CL_SetupLocalNetworkBackDoor( bool bUseBackDoor )
{
if ( bUseBackDoor )
{
if ( !g_pLocalNetworkBackdoor )
{
// start using local backdoor mode
g_pLocalNetworkBackdoor = &s_LocalNetworkBackdoor;
g_pLocalNetworkBackdoor->StartBackdoorMode();
}
}
else
{
if ( g_pLocalNetworkBackdoor )
{
// stop using localbackdooor mode
g_pLocalNetworkBackdoor->StopBackdoorMode();
g_pLocalNetworkBackdoor = NULL;
cl.ForceFullUpdate(); // clear baselines, request full packet update
}
}
}