From 52af5c65f59560607371cbdb250acc29aae4eaef Mon Sep 17 00:00:00 2001 From: vortex Date: Sat, 19 Mar 2011 17:37:07 +0000 Subject: [PATCH] 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 --- cl_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 (); -- 2.39.2