1
0
Fork 0
forked from fte/fteqw

restructured model loading to fail to load rather than error if given an unrecognised model.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@491 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-11-20 01:10:18 +00:00
parent 5e523f6c29
commit 2bcf7e04c3

View file

@ -567,6 +567,8 @@ model_t *GLMod_LoadModel (model_t *mod, qboolean crash)
} }
#endif #endif
couldntload:
if (crash) if (crash)
Host_EndGame ("Mod_NumForName: %s not found", mod->name); Host_EndGame ("Mod_NumForName: %s not found", mod->name);
@ -645,9 +647,13 @@ model_t *GLMod_LoadModel (model_t *mod, qboolean crash)
break; break;
#endif #endif
default: case 30: //hl
case 29: //q1
GLMod_LoadBrushModel (mod, buf); GLMod_LoadBrushModel (mod, buf);
break; break;
default:
Con_Printf("Unrecognised model format %i\n", LittleLong(*(unsigned *)buf));
goto couldntload;
} }
R_DefaultTrail(mod); R_DefaultTrail(mod);