From 20ab747b1389bd274ac56f7aadb17aac91458510 Mon Sep 17 00:00:00 2001 From: sezero Date: Sun, 2 Jan 2011 21:55:26 +0000 Subject: [PATCH] gl_model.h (model_t): Added a path_id member to store the information about the game directory from where the model is loaded. gl_model.c (Mod_LoadModel): Send the path_id member of the model to FS_Load* function, instead of NULL. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@371 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/gl_model.c | 2 +- quakespasm/Quake/gl_model.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/quakespasm/Quake/gl_model.c b/quakespasm/Quake/gl_model.c index 3fce61b7..411acf87 100644 --- a/quakespasm/Quake/gl_model.c +++ b/quakespasm/Quake/gl_model.c @@ -277,7 +277,7 @@ model_t *Mod_LoadModel (model_t *mod, qboolean crash) // // load the file // - buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), NULL); + buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), & mod->path_id); if (!buf) { if (crash) diff --git a/quakespasm/Quake/gl_model.h b/quakespasm/Quake/gl_model.h index c299cdbd..b395fc1f 100644 --- a/quakespasm/Quake/gl_model.h +++ b/quakespasm/Quake/gl_model.h @@ -364,6 +364,8 @@ typedef enum {mod_brush, mod_sprite, mod_alias} modtype_t; typedef struct model_s { char name[MAX_QPATH]; + unsigned int path_id; // path id of the game directory + // that this model came from qboolean needload; // bmodels and sprites don't cache normally modtype_t type;