From: havoc Date: Fri, 4 May 2007 01:17:16 +0000 (+0000) Subject: reenabled code that unloads unused models on level change X-Git-Tag: xonotic-v0.1.0preview~3219 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40998de73de25d37f37118f8f21945bdf9a0ebfc;p=xonotic%2Fdarkplaces.git reenabled code that unloads unused models on level change git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7227 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_parse.c b/cl_parse.c index 79c0469f..968a3d1d 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -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) diff --git a/model_shared.c b/model_shared.c index 9e610206..6b485314 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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;