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.
This commit is contained in:
Bill Currie 2012-01-23 16:47:43 +09:00
parent e3f76de898
commit 6437a77021

View file

@ -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);
}
}