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.

67 lines
2.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "quakedef.h"
  8. #include "networkstringtable.h"
  9. #include "utlvector.h"
  10. #include "eiface.h"
  11. #include "server.h"
  12. #include "framesnapshot.h"
  13. #include "utlsymbol.h"
  14. #include "utlrbtree.h"
  15. #include "host.h"
  16. #include "LocalNetworkBackdoor.h"
  17. #include "demo.h"
  18. // memdbgon must be the last include file in a .cpp file!!!
  19. #include "tier0/memdbgon.h"
  20. static CNetworkStringTableContainer s_NetworkStringTableServer;
  21. CNetworkStringTableContainer *networkStringTableContainerServer = &s_NetworkStringTableServer;
  22. // Expose interface
  23. EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CNetworkStringTableContainer, INetworkStringTableContainer, INTERFACENAME_NETWORKSTRINGTABLESERVER, s_NetworkStringTableServer );
  24. #ifdef SHARED_NET_STRING_TABLES
  25. // Expose same interface to client .dll as client string tables
  26. EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CNetworkStringTableContainer, INetworkStringTableContainer, INTERFACENAME_NETWORKSTRINGTABLECLIENT, s_NetworkStringTableServer );
  27. #endif
  28. //-----------------------------------------------------------------------------
  29. // Purpose:
  30. //-----------------------------------------------------------------------------
  31. void SV_CreateNetworkStringTables( char const *pchMapName )
  32. {
  33. // Gather the string table dictionary from the .bsp file
  34. g_pStringTableDictionary->OnLevelLoadStart( pchMapName, NULL );
  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. }
  52. void SV_CreateDictionary( char const *pchMapName )
  53. {
  54. s_NetworkStringTableServer.CreateDictionary( pchMapName );
  55. }