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.

130 lines
3.6 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: Expose functions from sv_main.cpp.
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef SV_MAIN_H
  8. #define SV_MAIN_H
  9. #include "edict.h"
  10. #include "packed_entity.h"
  11. #include "utlvector.h"
  12. #include "convar.h"
  13. #include "netadr.h"
  14. #include "checksum_crc.h"
  15. #include "soundflags.h"
  16. #include "tier1/bitbuf.h"
  17. #include "SoundEmitterSystem/isoundemittersystembase.h"
  18. #include "netmessages.pb.h"
  19. class CGameClient;
  20. //===========================================================
  21. // sv_main.c
  22. // Which areas are we going to transmit (usually 1, but with portals you can see into multiple other areas).
  23. extern CUtlVector<int> g_AreasNetworked;
  24. void SV_ProcessVoice( void );
  25. void SV_Frame( bool send_client_updates );
  26. void SV_FrameExecuteThreadDeferred();
  27. void SV_InitGameDLL( void );
  28. void SV_ReplicateConVarChange( ConVar const *var, char const *newValue );
  29. void SV_ExecuteRemoteCommand( const char *pCommand, int nClientSlot = -1 );
  30. void SV_InstallClientStringTableMirrors( void );
  31. void SV_ResetModInfo( void );
  32. class IRecipientFilter;
  33. void SV_StartSound ( IRecipientFilter& filter, edict_t *pSoundEmittingEntity, int iChannel, const char *pSoundEntry, HSOUNDSCRIPTHASH iSoundEntryHash, const char *pSample,
  34. float flVolume, soundlevel_t iSoundLevel, int iFlags, int iPitch, const Vector *pOrigin, float soundtime, int speakerentity, CUtlVector< Vector >* pUtlVecOrigins, int nSeed );
  35. int SV_ModelIndex (const char *name);
  36. int SV_FindOrAddModel (const char *name, bool preload );
  37. int SV_SoundIndex (const char *name);
  38. int SV_FindOrAddSound(const char *name, bool preload );
  39. int SV_GenericIndex(const char *name);
  40. int SV_FindOrAddGeneric(const char *name, bool preload );
  41. int SV_DecalIndex(const char *name);
  42. int SV_FindOrAddDecal(const char *name, bool preload );
  43. void SV_ForceExactFile( const char *name );
  44. void SV_ForceSimpleMaterial( const char *name );
  45. void SV_ForceModelBounds( const char *name, const Vector &mins, const Vector &maxs );
  46. void SV_Physics( bool bIsSimulating );
  47. void SV_PreClientUpdate( bool bIsSimulating );
  48. class IServerEntity;
  49. void SV_ExecuteClientMessage (CGameClient *cl);
  50. bool SV_ActivateServer();
  51. #ifdef ENABLE_RPT
  52. void SV_NotifyRPTOfDisconnect( int nClientSlot );
  53. #endif // ENABLE_RPT
  54. // sv_redirect.cpp
  55. enum redirect_t
  56. {
  57. RD_NONE = 0, // server console
  58. RD_CLIENT, // client console
  59. RD_PACKET, // connectionless UDP
  60. RD_SOCKET // TCP/IP remote socket
  61. };
  62. bool SV_RedirectActive( void );
  63. void SV_RedirectAddText( const char *txt );
  64. void SV_RedirectStart( redirect_t rd, const netadr_t *addr );
  65. void SV_RedirectEnd( void );
  66. class ServerClass;
  67. class IClient;
  68. class CClientFrame;
  69. // Builds an alternate copy of the datatable for any classes that have datatables with props excluded.
  70. void SV_InitSendTables( ServerClass *pClasses );
  71. void SV_TermSendTables( ServerClass *pClasses );
  72. // send voice data from cl to other clients
  73. void SV_BroadcastVoiceData(IClient * cl, const CCLCMsg_VoiceData& msg );
  74. void SV_SendRestoreMsg( bf_write &dest );
  75. // A client has uploaded its logo to us;
  76. void SV_SendLogo( CRC32_t& logoCRC );
  77. void SV_PruneRequestList( void );
  78. /*
  79. =============
  80. Calculates a PVS that is the inclusive or of all leafs within 8 pixels of the
  81. given point.
  82. =============
  83. */
  84. void SV_ResetPVS( byte* pvs, int pvssize );
  85. void SV_AddOriginToPVS( const Vector& origin );
  86. extern CGlobalVars g_ServerGlobalVariables;
  87. void SV_CheckForFlushMemory( const char *pCurrentMapName, const char *pDestMapName );
  88. bool SV_FlushMemoryIfMarked();
  89. void SV_FlushMemoryOnNextServer();
  90. void SV_SetSteamCrashComment();
  91. #endif