]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cl_lastquakeentity and cl_isquakeentity are now reset properly when loading a new...
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Aug 2005 10:40:19 +0000 (10:40 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Aug 2005 10:40:19 +0000 (10:40 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5581 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index 75ec32603672cd0dccb0e977440cb2122f69de87..16c8a2cc7650926d856d681119b95e1834baea97 100644 (file)
--- 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++)
        {