]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
reenabled code that unloads unused models on level change
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 May 2007 01:17:16 +0000 (01:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 May 2007 01:17:16 +0000 (01:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7227 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
model_shared.c

index 79c0469f2cd28f03d2fad8f45ba97a7b72c00346..968a3d1dfa8122346acdfd671b490bc506990c59 100644 (file)
@@ -479,7 +479,8 @@ static void QW_CL_RequestNextDownload(void)
 
                // touch all of the precached models that are still loaded so we can free
                // anything that isn't needed
-               Mod_ClearUsed();
+               if (!sv.active)
+                       Mod_ClearUsed();
                for (i = 1;i < MAX_MODELS && cl.model_name[i][0];i++)
                        Mod_FindName(cl.model_name[i]);
                // precache any models used by the client (this also marks them used)
@@ -1503,7 +1504,8 @@ void CL_ParseServerInfo (void)
 
                // touch all of the precached models that are still loaded so we can free
                // anything that isn't needed
-               Mod_ClearUsed();
+               if (!sv.active)
+                       Mod_ClearUsed();
                for (i = 1;i < nummodels;i++)
                        Mod_FindName(cl.model_name[i]);
                // precache any models used by the client (this also marks them used)
index 9e610206e2d823999c27219d8283d0824289e324..6b485314f0320671c8d53add696c94b046e7bb51 100644 (file)
@@ -268,7 +268,7 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolea
 
 void Mod_ClearUsed(void)
 {
-#if 0
+#if 1
        int i;
        model_t *mod;