From: vortex Date: Sat, 19 Mar 2011 17:37:07 +0000 (+0000) Subject: add -maxtempents switch to increase starting 256/4000 tempentities limit. X-Git-Tag: xonotic-v0.6.0~163^2~613 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=52af5c65f59560607371cbdb250acc29aae4eaef;p=xonotic%2Fdarkplaces.git add -maxtempents switch to increase starting 256/4000 tempentities limit. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10933 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index 0963ce99..cc3315f2 100644 --- a/cl_main.c +++ b/cl_main.c @@ -2361,6 +2361,8 @@ CL_Init */ void CL_Init (void) { + int i; + cls.levelmempool = Mem_AllocPool("client (per-level memory)", 0, NULL); cls.permanentmempool = Mem_AllocPool("client (long term memory)", 0, NULL); @@ -2369,7 +2371,13 @@ void CL_Init (void) r_refdef.scene.maxentities = MAX_EDICTS + 256 + 512; r_refdef.scene.entities = (entity_render_t **)Mem_Alloc(cls.permanentmempool, sizeof(entity_render_t *) * r_refdef.scene.maxentities); - r_refdef.scene.maxtempentities = MAX_TEMPENTITIES; // FIXME: make this grow + // max temp entities + // FIXME: make this grow + i = COM_CheckParm("-maxtempents"); + if (i) + r_refdef.scene.maxtempentities = atof(com_argv[i + 1]); + else + r_refdef.scene.maxtempentities = MAX_TEMPENTITIES; r_refdef.scene.tempentities = (entity_render_t *)Mem_Alloc(cls.permanentmempool, sizeof(entity_render_t) * r_refdef.scene.maxtempentities); CL_InitInput ();