MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SV_InitGameProgs

Function SV_InitGameProgs

code/server/sv_game.cpp:888–1094  ·  view source on GitHub ↗

=============== SV_InitGameProgs Init the game subsystem for a new map =============== */

Source from the content-addressed store, hash-verified

886===============
887*/
888void SV_InitGameProgs (void) {
889 game_import_t import;
890 int i;
891
892 // unload anything we have now
893 if ( ge ) {
894 SV_ShutdownGameProgs (qtrue);
895 }
896
897 // load a new game dll
898 import.Printf = Com_Printf;
899 import.WriteCam = Com_WriteCam;
900 import.FlushCamFile = Com_FlushCamFile;
901 import.Error = Com_Error;
902
903 import.Milliseconds = Sys_Milliseconds2;
904
905 import.DropClient = SV_GameDropClient;
906
907 import.SendServerCommand = SV_GameSendServerCommand;
908
909
910 import.linkentity = SV_LinkEntity;
911 import.unlinkentity = SV_UnlinkEntity;
912 import.EntitiesInBox = SV_AreaEntities;
913 import.EntityContact = SV_EntityContact;
914 import.trace = SV_Trace;
915 import.pointcontents = SV_PointContents;
916 import.totalMapContents = CM_TotalMapContents;
917 import.SetBrushModel = SV_SetBrushModel;
918
919 import.inPVS = SV_inPVS;
920 import.inPVSIgnorePortals = SV_inPVSIgnorePortals;
921
922 import.SetConfigstring = SV_SetConfigstring;
923 import.GetConfigstring = SV_GetConfigstring;
924
925 import.SetUserinfo = SV_SetUserinfo;
926 import.GetUserinfo = SV_GetUserinfo;
927
928 import.GetServerinfo = SV_GetServerinfo;
929
930 import.cvar = Cvar_Get;
931 import.cvar_set = Cvar_Set;
932 import.Cvar_VariableIntegerValue = Cvar_VariableIntegerValue;
933 import.Cvar_VariableStringBuffer = Cvar_VariableStringBuffer;
934
935 import.argc = Cmd_Argc;
936 import.argv = Cmd_Argv;
937 import.SendConsoleCommand = Cbuf_AddText;
938
939 import.FS_FOpenFile = FS_FOpenFileByMode;
940 import.FS_Read = FS_Read;
941 import.FS_Write = FS_Write;
942 import.FS_FCloseFile = FS_FCloseFile;
943 import.FS_ReadFile = FS_ReadFile;
944 import.FS_FreeFile = FS_FreeFile;
945 import.FS_GetFileList = FS_GetFileList;

Callers 1

SV_SpawnServerFunction · 0.70

Calls 9

Sys_LoadSPGameDllFunction · 0.85
Sys_UnloadDllFunction · 0.85
CL_InitCGameVMFunction · 0.85
SV_ShutdownGameProgsFunction · 0.70
Com_ErrorFunction · 0.50
CM_EntityStringFunction · 0.50
Z_TagFreeFunction · 0.50
Com_MillisecondsFunction · 0.50
InitMethod · 0.45

Tested by

no test coverage detected