From 90e7206cb1ca52c325dbc020b586ec9c348eacfc Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 7 Jan 2005 03:17:50 +0000 Subject: [PATCH] SW should support q2 models git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@764 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/sw/sw_model.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/engine/sw/sw_model.c b/engine/sw/sw_model.c index 361e9334b..b9056c31c 100644 --- a/engine/sw/sw_model.c +++ b/engine/sw/sw_model.c @@ -225,8 +225,8 @@ model_t *SWMod_FindName (char *name) int i; model_t *mod; - if (!name[0]) - Sys_Error ("Mod_ForName: NULL name"); +// if (!name[0]) //this is allowed to happen for q2 cinematics. :( +// Sys_Error ("Mod_ForName: NULL name"); // // search the currently loaded models @@ -295,6 +295,15 @@ model_t *SWMod_LoadModel (model_t *mod, qboolean crash) return mod; // not cached at all } + if (!*mod->name) + { + loadmodel = mod; + mod->needload = false; + Mod_LoadQ2BrushModel(mod, NULL); + R_DefaultTrail(mod); + return mod; + } + // // because the world is so huge, load it one piece at a time //