From: molivier Date: Mon, 15 Aug 2005 10:40:19 +0000 (+0000) Subject: cl_lastquakeentity and cl_isquakeentity are now reset properly when loading a new... X-Git-Tag: xonotic-v0.1.0preview~4645 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5cd6392b9a14f62c6ee8828364ee4d0b7e580e5;p=xonotic%2Fdarkplaces.git cl_lastquakeentity and cl_isquakeentity are now reset properly when loading a new map (fix the crash with coopmod) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5581 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index 75ec3260..16c8a2cc 100644 --- a/cl_main.c +++ b/cl_main.c @@ -99,6 +99,10 @@ int cl_num_static_entities; int cl_num_temp_entities; int cl_num_brushmodel_entities; +// keep track of quake entities because they need to be killed if they get stale +extern int cl_lastquakeentity; +extern qbyte cl_isquakeentity[MAX_EDICTS]; + /* ===================== CL_ClearState @@ -157,6 +161,9 @@ void CL_ClearState(void) cl_lightstyle = Mem_Alloc(cl_mempool, cl_max_lightstyle * sizeof(lightstyle_t)); cl_brushmodel_entities = Mem_Alloc(cl_mempool, cl_max_brushmodel_entities * sizeof(int)); + cl_lastquakeentity = 0; + memset(cl_isquakeentity, 0, sizeof(cl_isquakeentity)); + // LordHavoc: have to set up the baseline info for alpha and other stuff for (i = 0;i < cl_max_entities;i++) {