]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cl_main: Destroy mesh entities on restart to fix memlist getting cluttered
authorCloudwalk <cloudwalk009@gmail.com>
Wed, 21 Jul 2021 18:44:16 +0000 (14:44 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Wed, 21 Jul 2021 22:19:59 +0000 (18:19 -0400)
cl_main.c

index 4471edd3d4e24f9e6d645e2444bf406f30e75638..6d46bc77046e9c2ed0d74ac8999ce62468ed823e 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -2493,6 +2493,7 @@ static void CL_MeshEntities_Restart(void)
        for (i = 0; i < NUM_MESHENTITIES; i++)
        {
                ent = cl_meshentities + i;
+               Mod_Mesh_Destroy(ent->render.model);
                Mod_Mesh_Create(ent->render.model, cl_meshentitynames[i]);
        }
 }