mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
temporary hack to avoid crashing when s_explod.mdl isn't precached but
explosions are requested
This commit is contained in:
parent
629e22aa61
commit
7ba6756810
3 changed files with 10 additions and 1 deletions
|
@ -118,9 +118,12 @@ Mod_ClearAll (void)
|
||||||
int i;
|
int i;
|
||||||
model_t *mod;
|
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)
|
if (mod->type != mod_alias)
|
||||||
mod->needload = true;
|
mod->needload = true;
|
||||||
|
if (mod->type == mod_sprite)
|
||||||
|
mod->cache.data = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
model_t *
|
model_t *
|
||||||
|
|
|
@ -348,6 +348,9 @@ CL_ParseTEnt (void)
|
||||||
ex = CL_AllocExplosion ();
|
ex = CL_AllocExplosion ();
|
||||||
VectorCopy (pos, ex->ent.origin);
|
VectorCopy (pos, ex->ent.origin);
|
||||||
ex->start = cl.time;
|
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;
|
ex->ent.model = cl_spr_explod;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -354,6 +354,9 @@ CL_ParseTEnt (void)
|
||||||
R_RemoveEfrags (&ex->ent);
|
R_RemoveEfrags (&ex->ent);
|
||||||
VectorCopy (pos, ex->ent.origin);
|
VectorCopy (pos, ex->ent.origin);
|
||||||
ex->start = cl.time;
|
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;
|
ex->ent.model = cl_spr_explod;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue