mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
- 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.
This commit is contained in:
parent
ca51e3be02
commit
f59c2a2a0b
2 changed files with 8 additions and 5 deletions
|
@ -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 ();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue