From efaf5e13abaf9c8b114f2c41dbe7ef173d92b3e0 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 26 Sep 2009 17:15:25 +0000 Subject: [PATCH] added prvm_startupreuseedicttime cvar git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9241 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_edict.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prvm_edict.c b/prvm_edict.c index ef5622b0..1eba8141 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -39,6 +39,7 @@ cvar_t prvm_backtraceforwarnings = {0, "prvm_backtraceforwarnings", "0", "print cvar_t prvm_leaktest = {0, "prvm_leaktest", "0", "try to detect memory leaks in strings or entities"}; cvar_t prvm_leaktest_ignore_classnames = {0, "prvm_leaktest_ignore_classnames", "", "classnames of entities to NOT leak check because they are found by find(world, classname, ...) but are actually spawned by QC code (NOT map entities)"}; cvar_t prvm_errordump = {0, "prvm_errordump", "0", "write a savegame on crash to crash-server.dmp"}; +cvar_t prvm_startupreuseedicttime = {0, "prvm_startupreuseedicttime", "2", "allows immediate re-use of freed entity slots during start of new level (value in seconds)"}; qboolean prvm_runawaycheck = true; @@ -247,7 +248,7 @@ qboolean PRVM_ED_CanAlloc(prvm_edict_t *e) { if(!e->priv.required->free) return false; - if(e->priv.required->freetime < prog->starttime + 2) + if(e->priv.required->freetime < prog->starttime + prvm_startupreuseedicttime.value) return true; if(realtime > e->priv.required->freetime + 1) return true; @@ -2311,6 +2312,7 @@ void PRVM_Init (void) Cvar_RegisterVariable (&prvm_leaktest); Cvar_RegisterVariable (&prvm_leaktest_ignore_classnames); Cvar_RegisterVariable (&prvm_errordump); + Cvar_RegisterVariable (&prvm_startupreuseedicttime); // COMMANDLINEOPTION: PRVM: -norunaway disables the runaway loop check (it might be impossible to exit DarkPlaces if used!) prvm_runawaycheck = !COM_CheckParm("-norunaway"); -- 2.39.2