Fix QC adddecal() calls from crashing the engine when the affected model hasn't fully loaded.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5779 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2020-10-23 02:50:11 +00:00
parent 697edaac76
commit 0ceff5a31d

View file

@ -619,9 +619,9 @@ void Mod_ClipDecal(struct model_s *mod, vec3_t center, vec3_t normal, vec3_t tan
sh_shadowframe++; sh_shadowframe++;
if (!mod || mod->loadstate != MLS_LOADED || mod->type != mod_brush) if (!mod || mod->loadstate != MLS_LOADED)
{ return;
}
#ifdef Q1BSPS #ifdef Q1BSPS
else if (mod->fromgame == fg_quake || mod->fromgame == fg_halflife) else if (mod->fromgame == fg_quake || mod->fromgame == fg_halflife)
Q1BSP_ClipDecalToNodes(mod, &dec, mod->rootnode); Q1BSP_ClipDecalToNodes(mod, &dec, mod->rootnode);