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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@371 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2011-01-02 21:55:26 +00:00
parent c583b5b541
commit 51301e043c
2 changed files with 3 additions and 1 deletions

View file

@ -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)

View file

@ -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;