Counter Strike : Global Offensive Source Code
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.

43 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "client_pch.h"
  7. #include "cl_localnetworkbackdoor.h"
  8. #include "LocalNetworkBackdoor.h"
  9. #include "iclientnetworkable.h"
  10. #include "basehandle.h"
  11. #include "client_class.h"
  12. #include "dt_localtransfer.h"
  13. // memdbgon must be the last include file in a .cpp file!!!
  14. #include "tier0/memdbgon.h"
  15. static CLocalNetworkBackdoor s_LocalNetworkBackdoor;
  16. void CL_SetupLocalNetworkBackDoor( bool bUseBackDoor )
  17. {
  18. if ( bUseBackDoor )
  19. {
  20. if ( !g_pLocalNetworkBackdoor )
  21. {
  22. // start using local backdoor mode
  23. g_pLocalNetworkBackdoor = &s_LocalNetworkBackdoor;
  24. g_pLocalNetworkBackdoor->StartBackdoorMode();
  25. }
  26. }
  27. else
  28. {
  29. if ( g_pLocalNetworkBackdoor )
  30. {
  31. // stop using localbackdooor mode
  32. g_pLocalNetworkBackdoor->StopBackdoorMode();
  33. g_pLocalNetworkBackdoor = NULL;
  34. GetBaseLocalClient().ForceFullUpdate( "cl_localnetworkbackdoor state change" ); // clear baselines, request full packet update
  35. }
  36. }
  37. }