qboolean isworldmodel;
// true if this model is a HalfLife .bsp file
qboolean ishlbsp;
+ // true if this model was not successfully loaded and should be purged
+ qboolean error;
// mod_brush, mod_alias, mod_sprite
modtype_t type;
int numtextures;
texture_t *textures;
- msurface_t **texturesurfacechains;
-
qbyte *visdata;
qbyte *lightdata;
char *entities;
int numlights;
mlight_t *lights;
- // used only for casting dynamic shadow volumes
- shadowmesh_t *shadowmesh;
- vec3_t shadowmesh_mins, shadowmesh_maxs, shadowmesh_center;
- float shadowmesh_radius;
-
// pvs visibility marking
mleaf_t *pvsviewleaf;
int pvsviewleafnovis;
mleaf_t *pvsleafchain;
int *pvssurflist;
int pvssurflistlength;
+ // these get rebuilt as the player moves around if this is the world,
+ // otherwise they are left alone (no pvs for bmodels)
+ msurface_t ***pvstexturechains;
+ msurface_t **pvstexturechainsbuffer;
+ int *pvstexturechainslength;
+
+ // lightmap update chains for light styles
+ int light_styles;
+ qbyte *light_style;
+ int *light_stylevalue;
+ msurface_t ***light_styleupdatechains;
+ msurface_t **light_styleupdatechainsbuffer;
+ int light_scalebit;
+ float light_ambient;
// skin animation info
animscene_t *skinscenes; // [numskins]
void Mod_Init (void);
void Mod_CheckLoaded (model_t *mod);
void Mod_ClearAll (void);
+void Mod_ClearErrorModels (void);
model_t *Mod_FindName (const char *name);
model_t *Mod_ForName (const char *name, qboolean crash, qboolean checkdisk, qboolean isworldmodel);
void Mod_TouchModel (const char *name);
extern model_t *loadmodel;
extern char loadname[32]; // for hunk tags
-int Mod_FindTriangleWithEdge(const int *elements, int numtriangles, int start, int end);
+int Mod_FindTriangleWithEdge(const int *elements, int numtriangles, int start, int end, int ignore);
void Mod_BuildTriangleNeighbors(int *neighbors, const int *elements, int numtriangles);
void Mod_ValidateElements(const int *elements, int numtriangles, int numverts, const char *filename, int fileline);
void Mod_BuildTextureVectorsAndNormals(int numverts, int numtriangles, const float *vertex, const float *texcoord, const int *elements, float *svectors, float *tvectors, float *normals);