From: havoc Date: Mon, 14 Apr 2003 03:04:10 +0000 (+0000) Subject: expanded stats reporting (when in developer mode) of how many entities were processed... X-Git-Tag: xonotic-v0.1.0preview~6667 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=65f9505799fbdb378efddb64577554003d76c16d expanded stats reporting (when in developer mode) of how many entities were processed during loading (now displays parsed/inhibited/spawned/died) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2944 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/pr_edict.c b/pr_edict.c index 61f948c9..6c54a7ed 100644 --- a/pr_edict.c +++ b/pr_edict.c @@ -1041,11 +1041,14 @@ to call ED_CallSpawnFunctions () to let the objects initialize themselves. void ED_LoadFromFile (const char *data) { edict_t *ent; - int inhibit; + int parsed, inhibited, spawned, died; mfunction_t *func; ent = NULL; - inhibit = 0; + parsed = 0; + inhibited = 0; + spawned = 0; + died = 0; pr_global_struct->time = sv.time; // parse ents @@ -1062,6 +1065,7 @@ void ED_LoadFromFile (const char *data) else ent = ED_Alloc (); data = ED_ParseEdict (data, ent); + parsed++; // remove things from different skill levels or deathmatch if (deathmatch.integer) @@ -1069,7 +1073,7 @@ void ED_LoadFromFile (const char *data) if (((int)ent->v->spawnflags & SPAWNFLAG_NOT_DEATHMATCH)) { ED_Free (ent); - inhibit++; + inhibited++; continue; } } @@ -1078,7 +1082,7 @@ void ED_LoadFromFile (const char *data) || (current_skill >= 2 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_HARD ))) { ED_Free (ent); - inhibit++; + inhibited++; continue; } @@ -1109,9 +1113,12 @@ void ED_LoadFromFile (const char *data) pr_global_struct->self = EDICT_TO_PROG(ent); PR_ExecuteProgram (func - pr_functions, ""); + spawned++; + if (ent->free) + died++; } - Con_DPrintf ("%i entities inhibited\n", inhibit); + Con_DPrintf ("%i entities parsed, %i inhibited, %i spawned (%i removed self, %i stayed)\n", parsed, inhibited, spawned, died, spawned - died); }