temporary hack to avoid crashing when s_explod.mdl isn't precached but

explosions are requested
This commit is contained in:
Bill Currie 2004-01-17 07:14:42 +00:00
parent 629e22aa61
commit 7ba6756810
3 changed files with 10 additions and 1 deletions

View file

@ -118,9 +118,12 @@ Mod_ClearAll (void)
int i;
model_t *mod;
for (i = 0, mod = mod_known; i < mod_numknown; i++, mod++)
for (i = 0, mod = mod_known; i < mod_numknown; i++, mod++) {
if (mod->type != mod_alias)
mod->needload = true;
if (mod->type == mod_sprite)
mod->cache.data = 0;
}
}
model_t *

View file

@ -348,6 +348,9 @@ CL_ParseTEnt (void)
ex = CL_AllocExplosion ();
VectorCopy (pos, ex->ent.origin);
ex->start = cl.time;
//FIXME need better model management
if (!cl_spr_explod->cache.data)
cl_spr_explod = Mod_ForName ("progs/s_explod.spr", true);
ex->ent.model = cl_spr_explod;
break;

View file

@ -354,6 +354,9 @@ CL_ParseTEnt (void)
R_RemoveEfrags (&ex->ent);
VectorCopy (pos, ex->ent.origin);
ex->start = cl.time;
//FIXME need better model management
if (!cl_spr_explod->cache.data)
cl_spr_explod = Mod_ForName ("progs/s_explod.spr", true);
ex->ent.model = cl_spr_explod;
break;