From 6437a770219c852b84f5cce1834c402f5b9f0150 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 23 Jan 2012 16:47:43 +0900 Subject: [PATCH] Fix glsl qw alias model crc checking. GLSL alias models don't use the cache, so don't try to access the data via the cache. --- qw/source/cl_parse.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index b18548494..3bba0dbe4 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -373,7 +373,9 @@ Model_NextDownload (void) info_key = emodel_name; if (info_key && cl_model_crcs->int_val) { - aliashdr_t *ahdr = Cache_Get (&cl.model_precache[i]->cache); + aliashdr_t *ahdr = cl.model_precache[i]->aliashdr; + if (!ahdr) + ahdr = Cache_Get (&cl.model_precache[i]->cache); Info_SetValueForKey (cls.userinfo, info_key, va ("%d", ahdr->crc), 0); if (!cls.demoplayback) { @@ -381,7 +383,8 @@ Model_NextDownload (void) SZ_Print (&cls.netchan.message, va ("setinfo %s %d", info_key, ahdr->crc)); } - Cache_Release (&cl.model_precache[i]->cache); + if (!cl.model_precache[i]->aliashdr) + Cache_Release (&cl.model_precache[i]->cache); } }