renamed model_t to qmodel_t in order to avoid conflicts on solaris.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@676 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2012-05-30 08:56:06 +00:00
parent 614270110e
commit dbdd675552
21 changed files with 70 additions and 71 deletions

View File

@ -405,7 +405,7 @@ relinked. Other attributes can change without relinking.
void CL_ParseUpdate (int bits) void CL_ParseUpdate (int bits)
{ {
int i; int i;
model_t *model; qmodel_t *model;
int modnum; int modnum;
qboolean forcelink; qboolean forcelink;
entity_t *ent; entity_t *ent;

View File

@ -55,7 +55,7 @@ void CL_InitTEnts (void)
CL_ParseBeam CL_ParseBeam
================= =================
*/ */
void CL_ParseBeam (model_t *m) void CL_ParseBeam (qmodel_t *m)
{ {
int ent; int ent;
vec3_t start, end; vec3_t start, end;

View File

@ -79,7 +79,7 @@ typedef struct
typedef struct typedef struct
{ {
int entity; int entity;
struct model_s *model; struct qmodel_s *model;
float endtime; float endtime;
vec3_t start, end; vec3_t start, end;
} beam_t; } beam_t;
@ -197,7 +197,7 @@ typedef struct
// //
// information that is static for the entire time connected to a server // information that is static for the entire time connected to a server
// //
struct model_s *model_precache[MAX_MODELS]; struct qmodel_s *model_precache[MAX_MODELS];
struct sfx_s *sound_precache[MAX_SOUNDS]; struct sfx_s *sound_precache[MAX_SOUNDS];
char mapname[128]; char mapname[128];
@ -207,7 +207,7 @@ typedef struct
int gametype; int gametype;
// refresh related state // refresh related state
struct model_s *worldmodel; // cl_entitites[0].model struct qmodel_s *worldmodel; // cl_entitites[0].model
struct efrag_s *free_efrags; struct efrag_s *free_efrags;
int num_entities; // held in cl_entities array int num_entities; // held in cl_entities array
int num_statics; // held in cl_staticentities array int num_statics; // held in cl_staticentities array

View File

@ -33,7 +33,7 @@ ALIAS MODEL DISPLAY LIST GENERATION
================================================================= =================================================================
*/ */
model_t *aliasmodel; qmodel_t *aliasmodel;
aliashdr_t *paliashdr; aliashdr_t *paliashdr;
int used[8192]; // qboolean int used[8192]; // qboolean
@ -294,7 +294,7 @@ void BuildTris (void)
GL_MakeAliasModelDisplayLists GL_MakeAliasModelDisplayLists
================ ================
*/ */
void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr) void GL_MakeAliasModelDisplayLists (qmodel_t *m, aliashdr_t *hdr)
{ {
int i, j; int i, j;
int *cmds; int *cmds;
@ -312,7 +312,6 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
paliashdr = hdr; // (aliashdr_t *)Mod_Extradata (m); paliashdr = hdr; // (aliashdr_t *)Mod_Extradata (m);
//johnfitz -- generate meshes //johnfitz -- generate meshes
Con_DPrintf ("meshing %s...\n",m->name); Con_DPrintf ("meshing %s...\n",m->name);
BuildTris (); BuildTris ();

View File

@ -26,20 +26,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h" #include "quakedef.h"
model_t *loadmodel; qmodel_t *loadmodel;
char loadname[32]; // for hunk tags char loadname[32]; // for hunk tags
void Mod_LoadSpriteModel (model_t *mod, void *buffer); void Mod_LoadSpriteModel (qmodel_t *mod, void *buffer);
void Mod_LoadBrushModel (model_t *mod, void *buffer); void Mod_LoadBrushModel (qmodel_t *mod, void *buffer);
void Mod_LoadAliasModel (model_t *mod, void *buffer); void Mod_LoadAliasModel (qmodel_t *mod, void *buffer);
model_t *Mod_LoadModel (model_t *mod, qboolean crash); qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash);
cvar_t external_ents = {"external_ents", "1", CVAR_ARCHIVE}; cvar_t external_ents = {"external_ents", "1", CVAR_ARCHIVE};
byte mod_novis[MAX_MAP_LEAFS/8]; byte mod_novis[MAX_MAP_LEAFS/8];
#define MAX_MOD_KNOWN 2048 //johnfitz -- was 512 #define MAX_MOD_KNOWN 2048 /*johnfitz -- was 512 */
model_t mod_known[MAX_MOD_KNOWN]; qmodel_t mod_known[MAX_MOD_KNOWN];
int mod_numknown; int mod_numknown;
texture_t *r_notexture_mip; //johnfitz -- moved here from r_main.c texture_t *r_notexture_mip; //johnfitz -- moved here from r_main.c
@ -75,7 +75,7 @@ Mod_Extradata
Caches the data if needed Caches the data if needed
=============== ===============
*/ */
void *Mod_Extradata (model_t *mod) void *Mod_Extradata (qmodel_t *mod)
{ {
void *r; void *r;
@ -95,7 +95,7 @@ void *Mod_Extradata (model_t *mod)
Mod_PointInLeaf Mod_PointInLeaf
=============== ===============
*/ */
mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model) mleaf_t *Mod_PointInLeaf (vec3_t p, qmodel_t *model)
{ {
mnode_t *node; mnode_t *node;
float d; float d;
@ -126,7 +126,7 @@ mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model)
Mod_DecompressVis Mod_DecompressVis
=================== ===================
*/ */
byte *Mod_DecompressVis (byte *in, model_t *model) byte *Mod_DecompressVis (byte *in, qmodel_t *model)
{ {
static byte decompressed[MAX_MAP_LEAFS/8]; static byte decompressed[MAX_MAP_LEAFS/8];
int c; int c;
@ -170,7 +170,7 @@ byte *Mod_DecompressVis (byte *in, model_t *model)
return decompressed; return decompressed;
} }
byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model) byte *Mod_LeafPVS (mleaf_t *leaf, qmodel_t *model)
{ {
if (leaf == model->leafs) if (leaf == model->leafs)
return mod_novis; return mod_novis;
@ -185,7 +185,7 @@ Mod_ClearAll
void Mod_ClearAll (void) void Mod_ClearAll (void)
{ {
int i; int i;
model_t *mod; qmodel_t *mod;
for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++) for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++)
if (mod->type != mod_alias) if (mod->type != mod_alias)
@ -201,10 +201,10 @@ Mod_FindName
================== ==================
*/ */
model_t *Mod_FindName (const char *name) qmodel_t *Mod_FindName (const char *name)
{ {
int i; int i;
model_t *mod; qmodel_t *mod;
if (!name[0]) if (!name[0])
Sys_Error ("Mod_FindName: NULL name"); //johnfitz -- was "Mod_ForName" Sys_Error ("Mod_FindName: NULL name"); //johnfitz -- was "Mod_ForName"
@ -236,7 +236,7 @@ Mod_TouchModel
*/ */
void Mod_TouchModel (const char *name) void Mod_TouchModel (const char *name)
{ {
model_t *mod; qmodel_t *mod;
mod = Mod_FindName (name); mod = Mod_FindName (name);
@ -254,7 +254,7 @@ Mod_LoadModel
Loads a model into the cache Loads a model into the cache
================== ==================
*/ */
model_t *Mod_LoadModel (model_t *mod, qboolean crash) qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash)
{ {
byte *buf; byte *buf;
byte stackbuf[1024]; // avoid dirtying the cache heap byte stackbuf[1024]; // avoid dirtying the cache heap
@ -330,9 +330,9 @@ Mod_ForName
Loads in a model for the given name Loads in a model for the given name
================== ==================
*/ */
model_t *Mod_ForName (const char *name, qboolean crash) qmodel_t *Mod_ForName (const char *name, qboolean crash)
{ {
model_t *mod; qmodel_t *mod;
mod = Mod_FindName (name); mod = Mod_FindName (name);
@ -1519,7 +1519,7 @@ Therefore, the bounding box of the hull can be constructed entirely
from axial planes found in the clipnodes for that hull. from axial planes found in the clipnodes for that hull.
================= =================
*/ */
void Mod_BoundsFromClipNode (model_t *mod, int hull, int nodenum) void Mod_BoundsFromClipNode (qmodel_t *mod, int hull, int nodenum)
{ {
mplane_t *plane; mplane_t *plane;
mclipnode_t *node; mclipnode_t *node;
@ -1564,7 +1564,7 @@ void Mod_BoundsFromClipNode (model_t *mod, int hull, int nodenum)
Mod_LoadBrushModel Mod_LoadBrushModel
================= =================
*/ */
void Mod_LoadBrushModel (model_t *mod, void *buffer) void Mod_LoadBrushModel (qmodel_t *mod, void *buffer)
{ {
int i, j; int i, j;
dheader_t *header; dheader_t *header;
@ -2013,7 +2013,7 @@ void Mod_CalcAliasBounds (aliashdr_t *a)
Mod_SetExtraFlags -- johnfitz -- set up extra flags that aren't in the mdl Mod_SetExtraFlags -- johnfitz -- set up extra flags that aren't in the mdl
================= =================
*/ */
void Mod_SetExtraFlags (model_t *mod) void Mod_SetExtraFlags (qmodel_t *mod)
{ {
extern cvar_t r_nolerp_list; extern cvar_t r_nolerp_list;
const char *s; const char *s;
@ -2070,7 +2070,7 @@ void Mod_SetExtraFlags (model_t *mod)
Mod_LoadAliasModel Mod_LoadAliasModel
================= =================
*/ */
void Mod_LoadAliasModel (model_t *mod, void *buffer) void Mod_LoadAliasModel (qmodel_t *mod, void *buffer)
{ {
int i, j; int i, j;
mdl_t *pinmodel; mdl_t *pinmodel;
@ -2328,7 +2328,7 @@ void * Mod_LoadSpriteGroup (void * pin, mspriteframe_t **ppframe, int framenum)
Mod_LoadSpriteModel Mod_LoadSpriteModel
================= =================
*/ */
void Mod_LoadSpriteModel (model_t *mod, void *buffer) void Mod_LoadSpriteModel (qmodel_t *mod, void *buffer)
{ {
int i; int i;
int version; int version;
@ -2408,7 +2408,7 @@ Mod_Print
void Mod_Print (void) void Mod_Print (void)
{ {
int i; int i;
model_t *mod; qmodel_t *mod;
Con_SafePrintf ("Cached models:\n"); //johnfitz -- safeprint instead of print Con_SafePrintf ("Cached models:\n"); //johnfitz -- safeprint instead of print
for (i=0, mod=mod_known ; i < mod_numknown ; i++, mod++) for (i=0, mod=mod_known ; i < mod_numknown ; i++, mod++)

View File

@ -361,7 +361,7 @@ typedef enum {mod_brush, mod_sprite, mod_alias} modtype_t;
#define MOD_FBRIGHTHACK 1024 //when fullbrights are disabled, use a hack to render this model brighter #define MOD_FBRIGHTHACK 1024 //when fullbrights are disabled, use a hack to render this model brighter
//johnfitz //johnfitz
typedef struct model_s typedef struct qmodel_s
{ {
char name[MAX_QPATH]; char name[MAX_QPATH];
unsigned int path_id; // path id of the game directory unsigned int path_id; // path id of the game directory
@ -440,19 +440,19 @@ typedef struct model_s
// //
cache_user_t cache; // only access through Mod_Extradata cache_user_t cache; // only access through Mod_Extradata
} model_t; } qmodel_t;
//============================================================================ //============================================================================
void Mod_Init (void); void Mod_Init (void);
void Mod_ClearAll (void); void Mod_ClearAll (void);
model_t *Mod_ForName (const char *name, qboolean crash); qmodel_t *Mod_ForName (const char *name, qboolean crash);
void *Mod_Extradata (model_t *mod); // handles caching void *Mod_Extradata (qmodel_t *mod); // handles caching
void Mod_TouchModel (const char *name); void Mod_TouchModel (const char *name);
mleaf_t *Mod_PointInLeaf (float *p, model_t *model); mleaf_t *Mod_PointInLeaf (float *p, qmodel_t *model);
byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model); byte *Mod_LeafPVS (mleaf_t *leaf, qmodel_t *model);
void Mod_SetExtraFlags (model_t *mod); void Mod_SetExtraFlags (qmodel_t *mod);
#endif // __MODEL__ #endif // __MODEL__

View File

@ -190,7 +190,7 @@ R_AddEfrags
*/ */
void R_AddEfrags (entity_t *ent) void R_AddEfrags (entity_t *ent)
{ {
model_t *entmodel; qmodel_t *entmodel;
int i; int i;
if (!ent->model) if (!ent->model)

View File

@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
float Fog_GetDensity(void); float Fog_GetDensity(void);
float *Fog_GetColor(void); float *Fog_GetColor(void);
extern model_t *loadmodel; extern qmodel_t *loadmodel;
extern int rs_skypolys; //for r_speeds readout extern int rs_skypolys; //for r_speeds readout
extern int rs_skypasses; //for r_speeds readout extern int rs_skypasses; //for r_speeds readout
float skyflatcolor[3]; float skyflatcolor[3];

View File

@ -300,7 +300,7 @@ float TexMgr_FrameUsage (void)
TexMgr_FindTexture TexMgr_FindTexture
================ ================
*/ */
gltexture_t *TexMgr_FindTexture (model_t *owner, const char *name) gltexture_t *TexMgr_FindTexture (qmodel_t *owner, const char *name)
{ {
gltexture_t *glt; gltexture_t *glt;
@ -405,7 +405,7 @@ void TexMgr_FreeTextures (unsigned int flags, unsigned int mask)
TexMgr_FreeTexturesForOwner TexMgr_FreeTexturesForOwner
================ ================
*/ */
void TexMgr_FreeTexturesForOwner (model_t *owner) void TexMgr_FreeTexturesForOwner (qmodel_t *owner)
{ {
gltexture_t *glt, *next; gltexture_t *glt, *next;
@ -1147,7 +1147,7 @@ static void TexMgr_LoadLightmap (gltexture_t *glt, byte *data)
TexMgr_LoadImage -- the one entry point for loading all textures TexMgr_LoadImage -- the one entry point for loading all textures
================ ================
*/ */
gltexture_t *TexMgr_LoadImage (model_t *owner, const char *name, int width, int height, enum srcformat format, gltexture_t *TexMgr_LoadImage (qmodel_t *owner, const char *name, int width, int height, enum srcformat format,
byte *data, const char *source_file, src_offset_t source_offset, unsigned flags) byte *data, const char *source_file, src_offset_t source_offset, unsigned flags)
{ {
unsigned short crc; unsigned short crc;

View File

@ -46,7 +46,7 @@ typedef struct gltexture_s {
//managed by texture manager //managed by texture manager
GLuint texnum; GLuint texnum;
struct gltexture_s *next; struct gltexture_s *next;
model_t *owner; qmodel_t *owner;
//managed by image loading //managed by image loading
char name[64]; char name[64];
unsigned int width; //size of image as it exists in opengl unsigned int width; //size of image as it exists in opengl
@ -77,16 +77,16 @@ extern unsigned int d_8to24table_pants[256];
// TEXTURE MANAGER // TEXTURE MANAGER
float TexMgr_FrameUsage (void); float TexMgr_FrameUsage (void);
gltexture_t *TexMgr_FindTexture (model_t *owner, const char *name); gltexture_t *TexMgr_FindTexture (qmodel_t *owner, const char *name);
gltexture_t *TexMgr_NewTexture (void); gltexture_t *TexMgr_NewTexture (void);
void TexMgr_FreeTexture (gltexture_t *kill); void TexMgr_FreeTexture (gltexture_t *kill);
void TexMgr_FreeTextures (unsigned int flags, unsigned int mask); void TexMgr_FreeTextures (unsigned int flags, unsigned int mask);
void TexMgr_FreeTexturesForOwner (model_t *owner); void TexMgr_FreeTexturesForOwner (qmodel_t *owner);
void TexMgr_NewGame (void); void TexMgr_NewGame (void);
void TexMgr_Init (void); void TexMgr_Init (void);
// IMAGE LOADING // IMAGE LOADING
gltexture_t *TexMgr_LoadImage (model_t *owner, const char *name, int width, int height, enum srcformat format, gltexture_t *TexMgr_LoadImage (qmodel_t *owner, const char *name, int width, int height, enum srcformat format,
byte *data, const char *source_file, src_offset_t source_offset, unsigned flags); byte *data, const char *source_file, src_offset_t source_offset, unsigned flags);
void TexMgr_ReloadImage (gltexture_t *glt, int shirt, int pants); void TexMgr_ReloadImage (gltexture_t *glt, int shirt, int pants);
void TexMgr_ReloadImages (void); void TexMgr_ReloadImages (void);

View File

@ -45,7 +45,7 @@ float turbsin[] =
// //
//============================================================================== //==============================================================================
extern model_t *loadmodel; extern qmodel_t *loadmodel;
msurface_t *warpface; msurface_t *warpface;

View File

@ -297,7 +297,7 @@ void GL_DrawAliasShadow (entity_t *e);
void DrawGLTriangleFan (glpoly_t *p); void DrawGLTriangleFan (glpoly_t *p);
void DrawGLPoly (glpoly_t *p); void DrawGLPoly (glpoly_t *p);
void DrawWaterPoly (glpoly_t *p); void DrawWaterPoly (glpoly_t *p);
void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr); void GL_MakeAliasModelDisplayLists (qmodel_t *m, aliashdr_t *hdr);
void Sky_Init (void); void Sky_Init (void);
void Sky_DrawSky (void); void Sky_DrawSky (void);

View File

@ -2068,7 +2068,7 @@ Host_Viewmodel_f
void Host_Viewmodel_f (void) void Host_Viewmodel_f (void)
{ {
edict_t *e; edict_t *e;
model_t *m; qmodel_t *m;
e = FindViewthing (); e = FindViewthing ();
if (!e) if (!e)
@ -2094,7 +2094,7 @@ void Host_Viewframe_f (void)
{ {
edict_t *e; edict_t *e;
int f; int f;
model_t *m; qmodel_t *m;
e = FindViewthing (); e = FindViewthing ();
if (!e) if (!e)
@ -2109,7 +2109,7 @@ void Host_Viewframe_f (void)
} }
void PrintFrameName (model_t *m, int frame) void PrintFrameName (qmodel_t *m, int frame)
{ {
aliashdr_t *hdr; aliashdr_t *hdr;
maliasframedesc_t *pframedesc; maliasframedesc_t *pframedesc;
@ -2130,7 +2130,7 @@ Host_Viewnext_f
void Host_Viewnext_f (void) void Host_Viewnext_f (void)
{ {
edict_t *e; edict_t *e;
model_t *m; qmodel_t *m;
e = FindViewthing (); e = FindViewthing ();
if (!e) if (!e)
@ -2152,7 +2152,7 @@ Host_Viewprev_f
void Host_Viewprev_f (void) void Host_Viewprev_f (void)
{ {
edict_t *e; edict_t *e;
model_t *m; qmodel_t *m;
e = FindViewthing (); e = FindViewthing ();
if (!e) if (!e)

View File

@ -265,7 +265,7 @@ static void PF_setmodel (void)
{ {
int i; int i;
const char *m, **check; const char *m, **check;
model_t *mod; qmodel_t *mod;
edict_t *e; edict_t *e;
e = G_EDICT(OFS_PARM0); e = G_EDICT(OFS_PARM0);

View File

@ -505,7 +505,7 @@ void R_DrawBrushModel (entity_t *e)
msurface_t *psurf; msurface_t *psurf;
float dot; float dot;
mplane_t *pplane; mplane_t *pplane;
model_t *clmodel; qmodel_t *clmodel;
if (R_CullModelForEntity(e)) if (R_CullModelForEntity(e))
return; return;
@ -598,7 +598,7 @@ void R_DrawBrushModel_ShowTris (entity_t *e)
msurface_t *psurf; msurface_t *psurf;
float dot; float dot;
mplane_t *pplane; mplane_t *pplane;
model_t *clmodel; qmodel_t *clmodel;
glpoly_t *p; glpoly_t *p;
if (R_CullModelForEntity(e)) if (R_CullModelForEntity(e))
@ -761,7 +761,7 @@ int AllocBlock (int w, int h, int *x, int *y)
mvertex_t *r_pcurrentvertbase; mvertex_t *r_pcurrentvertbase;
model_t *currentmodel; qmodel_t *currentmodel;
int nColinElim; int nColinElim;
@ -873,7 +873,7 @@ void GL_BuildLightmaps (void)
char name[16]; char name[16];
byte *data; byte *data;
int i, j; int i, j;
model_t *m; qmodel_t *m;
memset (allocated, 0, sizeof(allocated)); memset (allocated, 0, sizeof(allocated));
@ -1156,7 +1156,7 @@ R_RebuildAllLightmaps -- johnfitz -- called when gl_overbright gets toggled
void R_RebuildAllLightmaps (void) void R_RebuildAllLightmaps (void)
{ {
int i, j; int i, j;
model_t *mod; qmodel_t *mod;
msurface_t *fa; msurface_t *fa;
byte *base; byte *base;

View File

@ -27,7 +27,7 @@ extern cvar_t gl_fullbrights, r_drawflat, gl_overbright, r_oldwater, r_oldskylea
extern glpoly_t *lightmap_polys[MAX_LIGHTMAPS]; extern glpoly_t *lightmap_polys[MAX_LIGHTMAPS];
byte *SV_FatPVS (vec3_t org, model_t *worldmodel); byte *SV_FatPVS (vec3_t org, qmodel_t *worldmodel);
extern byte mod_novis[MAX_MAP_LEAFS/8]; extern byte mod_novis[MAX_MAP_LEAFS/8];
int vis_changed; //if true, force pvs to be refreshed int vis_changed; //if true, force pvs to be refreshed

View File

@ -60,7 +60,7 @@ typedef struct entity_s
vec3_t origin; vec3_t origin;
vec3_t msg_angles[2]; // last two updates (0 is newest) vec3_t msg_angles[2]; // last two updates (0 is newest)
vec3_t angles; vec3_t angles;
struct model_s *model; // NULL = no model struct qmodel_s *model; // NULL = no model
struct efrag_s *efrag; // linked list of efrags struct efrag_s *efrag; // linked list of efrags
int frame; int frame;
float syncbase; // for client-side animations float syncbase; // for client-side animations

View File

@ -51,9 +51,9 @@ typedef struct
char name[64]; // map name char name[64]; // map name
char modelname[64]; // maps/<name>.bsp, for model_precache[0] char modelname[64]; // maps/<name>.bsp, for model_precache[0]
struct model_s *worldmodel; struct qmodel_s *worldmodel;
const char *model_precache[MAX_MODELS]; // NULL terminated const char *model_precache[MAX_MODELS]; // NULL terminated
struct model_s *models[MAX_MODELS]; struct qmodel_s *models[MAX_MODELS];
const char *sound_precache[MAX_SOUNDS]; // NULL terminated const char *sound_precache[MAX_SOUNDS]; // NULL terminated
const char *lightstyles[MAX_LIGHTSTYLES]; const char *lightstyles[MAX_LIGHTSTYLES];
int num_edicts; int num_edicts;

View File

@ -432,7 +432,7 @@ crosses a waterline.
int fatbytes; int fatbytes;
byte fatpvs[MAX_MAP_LEAFS/8]; byte fatpvs[MAX_MAP_LEAFS/8];
void SV_AddToFatPVS (vec3_t org, mnode_t *node, model_t *worldmodel) //johnfitz -- added worldmodel as a parameter void SV_AddToFatPVS (vec3_t org, mnode_t *node, qmodel_t *worldmodel) //johnfitz -- added worldmodel as a parameter
{ {
int i; int i;
byte *pvs; byte *pvs;
@ -475,7 +475,7 @@ Calculates a PVS that is the inclusive or of all leafs within 8 pixels of the
given point. given point.
============= =============
*/ */
byte *SV_FatPVS (vec3_t org, model_t *worldmodel) //johnfitz -- added worldmodel as a parameter byte *SV_FatPVS (vec3_t org, qmodel_t *worldmodel) //johnfitz -- added worldmodel as a parameter
{ {
fatbytes = (worldmodel->numleafs+31)>>3; fatbytes = (worldmodel->numleafs+31)>>3;
Q_memset (fatpvs, 0, fatbytes); Q_memset (fatpvs, 0, fatbytes);
@ -490,7 +490,7 @@ SV_VisibleToClient -- johnfitz
PVS test encapsulated in a nice function PVS test encapsulated in a nice function
============= =============
*/ */
qboolean SV_VisibleToClient (edict_t *client, edict_t *test, model_t *worldmodel) qboolean SV_VisibleToClient (edict_t *client, edict_t *test, qmodel_t *worldmodel)
{ {
byte *pvs; byte *pvs;
vec3_t org; vec3_t org;

View File

@ -130,7 +130,7 @@ testing object's origin to get a point to use with the returned hull.
*/ */
hull_t *SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset) hull_t *SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
{ {
model_t *model; qmodel_t *model;
vec3_t size; vec3_t size;
vec3_t hullmins, hullmaxs; vec3_t hullmins, hullmaxs;
hull_t *hull; hull_t *hull;

View File

@ -874,10 +874,10 @@ void Cache_Free (cache_user_t *c, qboolean freetextures) //johnfitz -- added sec
Cache_UnlinkLRU (cs); Cache_UnlinkLRU (cs);
//johnfitz -- if a model becomes uncached, free the gltextures. This only works //johnfitz -- if a model becomes uncached, free the gltextures. This only works
//becuase the cache_user_t is the last component of the model_t struct. Should //becuase the cache_user_t is the last component of the qmodel_t struct. Should
//fail harmlessly if *c is actually part of an sfx_t struct. I FEEL DIRTY //fail harmlessly if *c is actually part of an sfx_t struct. I FEEL DIRTY
if (freetextures) if (freetextures)
TexMgr_FreeTexturesForOwner ((model_t *)(c + 1) - 1); TexMgr_FreeTexturesForOwner ((qmodel_t *)(c + 1) - 1);
} }