From 40998de73de25d37f37118f8f21945bdf9a0ebfc Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 4 May 2007 01:17:16 +0000 Subject: [PATCH] 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 --- cl_parse.c | 6 ++++-- model_shared.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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; -- 2.39.2