From f59c2a2a0b43ebb4e0ab15401475876e14190ced Mon Sep 17 00:00:00 2001 From: Adam Olsen Date: Thu, 20 Sep 2001 19:34:02 +0000 Subject: [PATCH] - build fix for without curses - add a "zombie" line to edictcount, which is the number of ents that are "free" but not long enough to be reused. --- libs/console/server.c | 2 +- libs/gamecode/engine/pr_edict.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/console/server.c b/libs/console/server.c index 5bb05d548..58bed6392 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -110,9 +110,9 @@ C_ExecLine (const char *line) static void C_Init (void) { +#ifdef HAVE_CURSES_H cvar_t *curses = Cvar_Get ("sv_use_curses", "1", CVAR_ROM, NULL, "set to 0 to disable curses server console"); -#ifdef HAVE_CURSES_H use_curses = curses->int_val; if (use_curses) { initscr (); diff --git a/libs/gamecode/engine/pr_edict.c b/libs/gamecode/engine/pr_edict.c index 0452ea64c..f93fed6df 100644 --- a/libs/gamecode/engine/pr_edict.c +++ b/libs/gamecode/engine/pr_edict.c @@ -678,17 +678,20 @@ ED_Count (progs_t * pr) { int i; edict_t *ent; - int active, models, solid, step; + int active, models, solid, step, zombie; ddef_t *solid_def; ddef_t *model_def; solid_def = ED_FindField (pr, "solid"); model_def = ED_FindField (pr, "model"); - active = models = solid = step = 0; + active = models = solid = step = zombie = 0; for (i = 0; i < *(pr)->num_edicts; i++) { ent = EDICT_NUM (pr, i); - if (ent->free) + if (ent->free) { + if (*(pr)->time - ent->freetime <= 0.5) + zombie++; continue; + } active++; if (solid_def && ent->v[solid_def->ofs].float_var) solid++; @@ -700,7 +703,7 @@ ED_Count (progs_t * pr) Con_Printf ("active :%3i\n", active); Con_Printf ("view :%3i\n", models); Con_Printf ("touch :%3i\n", solid); - + Con_Printf ("zombie :%3i\n", zombie); } /*