X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=prvm_edict.c;h=aee3eba5edc3ae03270b1aed9791458f570a9341;hb=e0ed43d2d6fdae2375244257789852ecdf38893a;hp=4d4be14b0027ac045ef741b2c07d15e3f150d7fb;hpb=280eaa59ec9f7f813d00b6311f251ee397311074;p=xonotic%2Fdarkplaces.git diff --git a/prvm_edict.c b/prvm_edict.c index 4d4be14b..aee3eba5 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -872,7 +872,7 @@ void PRVM_ED_ParseGlobals (const char *data) while (1) { // parse key - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, false)) PRVM_ERROR ("PRVM_ED_ParseGlobals: EOF without closing brace"); if (com_token[0] == '}') break; @@ -880,7 +880,7 @@ void PRVM_ED_ParseGlobals (const char *data) strlcpy (keyname, com_token, sizeof(keyname)); // parse value - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, true)) PRVM_ERROR ("PRVM_ED_ParseGlobals: EOF without closing brace"); if (com_token[0] == '}') @@ -1129,7 +1129,7 @@ const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent) while (1) { // parse key - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, false)) PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace"); if (developer_entityparsing.integer) Con_Printf("Key: \"%s\"", com_token); @@ -1161,7 +1161,7 @@ const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent) } // parse value - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, true)) PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace"); if (developer_entityparsing.integer) Con_Printf(" \"%s\"\n", com_token); @@ -1236,7 +1236,7 @@ void PRVM_ED_LoadFromFile (const char *data) while (1) { // parse the opening brace - if (!COM_ParseToken_Simple(&data, false)) + if (!COM_ParseToken_Simple(&data, false, false)) break; if (com_token[0] != '{') PRVM_ERROR ("PRVM_ED_LoadFromFile: %s: found %s when expecting {", PRVM_NAME, com_token); @@ -1461,6 +1461,7 @@ void PRVM_FindOffsets(void) prog->globaloffsets.dmg_save = PRVM_ED_FindGlobalOffset("dmg_save"); prog->globaloffsets.dmg_origin = PRVM_ED_FindGlobalOffset("dmg_origin"); prog->globaloffsets.sb_showscores = PRVM_ED_FindGlobalOffset("sb_showscores"); + prog->globaloffsets.drawfont = PRVM_ED_FindGlobalOffset("drawfont"); // menu qc only uses some functions, nothing else prog->funcoffsets.m_display = PRVM_ED_FindFunctionOffset("m_display"); @@ -1500,6 +1501,7 @@ void PRVM_ResetProg() PRVM_GCALL(reset_cmd)(); Mem_FreePool(&prog->progs_mempool); memset(prog,0,sizeof(prvm_prog_t)); + prog->starttime = Sys_DoubleTime(); } /* @@ -2028,6 +2030,7 @@ void PRVM_Init (void) Cmd_AddCommand ("prvm_edicts", PRVM_ED_PrintEdicts_f, "prints all data about all entities in the selected VM (server, client, menu)"); Cmd_AddCommand ("prvm_edictcount", PRVM_ED_Count_f, "prints number of active entities in the selected VM (server, client, menu)"); Cmd_AddCommand ("prvm_profile", PRVM_Profile_f, "prints execution statistics about the most used QuakeC functions in the selected VM (server, client, menu)"); + Cmd_AddCommand ("prvm_callprofile", PRVM_CallProfile_f, "prints execution statistics about the most time consuming QuakeC calls from the engine in the selected VM (server, client, menu)"); Cmd_AddCommand ("prvm_fields", PRVM_Fields_f, "prints usage statistics on properties (how many entities have non-zero values) in the selected VM (server, client, menu)"); Cmd_AddCommand ("prvm_globals", PRVM_Globals_f, "prints all global variables in the selected VM (server, client, menu)"); Cmd_AddCommand ("prvm_global", PRVM_Global_f, "prints value of a specified global variable in the selected VM (server, client, menu)"); @@ -2061,6 +2064,7 @@ void PRVM_InitProg(int prognr) PRVM_ResetProg(); memset(prog, 0, sizeof(prvm_prog_t)); + prog->starttime = Sys_DoubleTime(); prog->error_cmd = Host_Error; }