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:
parent
5e523f6c29
commit
2bcf7e04c3
1 changed files with 7 additions and 1 deletions
|
@ -567,6 +567,8 @@ model_t *GLMod_LoadModel (model_t *mod, qboolean crash)
|
|||
}
|
||||
#endif
|
||||
|
||||
couldntload:
|
||||
|
||||
if (crash)
|
||||
Host_EndGame ("Mod_NumForName: %s not found", mod->name);
|
||||
|
||||
|
@ -645,9 +647,13 @@ model_t *GLMod_LoadModel (model_t *mod, qboolean crash)
|
|||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
case 30: //hl
|
||||
case 29: //q1
|
||||
GLMod_LoadBrushModel (mod, buf);
|
||||
break;
|
||||
default:
|
||||
Con_Printf("Unrecognised model format %i\n", LittleLong(*(unsigned *)buf));
|
||||
goto couldntload;
|
||||
}
|
||||
|
||||
R_DefaultTrail(mod);
|
||||
|
|
Loading…
Reference in a new issue