Team Fortress 2 Source Code as on 22/4/2020
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.

62 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "quakedef.h"
  8. #include "networkstringtable.h"
  9. #include "networkstringtableitem.h"
  10. #include "networkstringtable.h"
  11. #include "utlvector.h"
  12. #include "eiface.h"
  13. #include "server.h"
  14. #include "framesnapshot.h"
  15. #include "utlsymbol.h"
  16. #include "utlrbtree.h"
  17. #include "host.h"
  18. #include "LocalNetworkBackdoor.h"
  19. #include "demo.h"
  20. // memdbgon must be the last include file in a .cpp file!!!
  21. #include "tier0/memdbgon.h"
  22. static CNetworkStringTableContainer s_NetworkStringTableServer;
  23. CNetworkStringTableContainer *networkStringTableContainerServer = &s_NetworkStringTableServer;
  24. // Expose interface
  25. EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CNetworkStringTableContainerServer, INetworkStringTableContainer, INTERFACENAME_NETWORKSTRINGTABLESERVER, s_NetworkStringTableServer );
  26. #ifdef SHARED_NET_STRING_TABLES
  27. // Expose same interface to client .dll as client string tables
  28. EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CNetworkStringTableContainer, INetworkStringTableContainer, INTERFACENAME_NETWORKSTRINGTABLECLIENT, s_NetworkStringTableServer );
  29. #endif
  30. //-----------------------------------------------------------------------------
  31. // Purpose:
  32. //-----------------------------------------------------------------------------
  33. void SV_CreateNetworkStringTables( void )
  34. {
  35. // Remove any existing tables
  36. s_NetworkStringTableServer.RemoveAllTables();
  37. // Unset timing guard and create tables
  38. s_NetworkStringTableServer.AllowCreation( true );
  39. // Create engine tables
  40. sv.CreateEngineStringTables();
  41. // Create game code tables
  42. serverGameDLL->CreateNetworkStringTables();
  43. s_NetworkStringTableServer.AllowCreation( false );
  44. }
  45. //-----------------------------------------------------------------------------
  46. // Purpose:
  47. //-----------------------------------------------------------------------------
  48. void SV_PrintStringTables( void )
  49. {
  50. s_NetworkStringTableServer.Dump();
  51. }