mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-10 06:32:03 +00:00
Add support for replacing missing models
Replaces with missing_model.mdl.
This commit is contained in:
parent
3646b8f421
commit
98e4595d0e
2 changed files with 9 additions and 5 deletions
|
@ -1203,10 +1203,12 @@ void Con_DrawConsole (int lines, qboolean drawinput)
|
|||
GL_SetCanvas (CANVAS_CONSOLE);
|
||||
|
||||
// draw the background
|
||||
Draw_ConsoleBackground ();
|
||||
|
||||
if (!console_enabled && !developer.value)
|
||||
return;
|
||||
|
||||
Draw_ConsoleBackground ();
|
||||
|
||||
// draw the buffer text
|
||||
rows = (con_vislines +7)/8;
|
||||
y = vid.conheight - rows*8;
|
||||
|
|
|
@ -334,9 +334,11 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash)
|
|||
buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), & mod->path_id);
|
||||
if (!buf)
|
||||
{
|
||||
if (crash)
|
||||
Host_Error ("Mod_LoadModel: %s not found", mod->name); //johnfitz -- was "Mod_NumForName"
|
||||
return NULL;
|
||||
buf = (unsigned*)COM_LoadStackFile ("models/missing_model.mdl", stackbuf, sizeof(stackbuf), NULL);
|
||||
if (buf){
|
||||
Con_Printf ("Missing model %s substituted\n", mod->name);
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue