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.

51 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #include "dt_stack.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. CDatatableStack::CDatatableStack( CSendTablePrecalc *pPrecalc, unsigned char *pStructBase, int objectID )
  12. {
  13. m_pPrecalc = pPrecalc;
  14. m_pStructBase = pStructBase;
  15. m_ObjectID = objectID;
  16. m_iCurProp = 0;
  17. m_pCurProp = NULL;
  18. m_bInitted = false;
  19. #ifdef _DEBUG
  20. memset( m_pProxies, 0xFF, sizeof( m_pProxies ) );
  21. #endif
  22. m_bLocalNetworkBackDoor = false;
  23. }
  24. void CDatatableStack::Init( bool bExplicitRoutes, bool bLocalNetworkBackDoor )
  25. {
  26. m_bLocalNetworkBackDoor = bLocalNetworkBackDoor;
  27. if ( bExplicitRoutes )
  28. {
  29. memset( m_pProxies, 0xFF, sizeof( m_pProxies[0] ) * m_pPrecalc->m_ProxyPaths.Count() );
  30. }
  31. else
  32. {
  33. // Walk down the tree and call all the datatable proxies as we hit them.
  34. RecurseAndCallProxies( &m_pPrecalc->m_Root, m_pStructBase );
  35. }
  36. m_bInitted = true;
  37. }