VectorCopy(info.center, out);
}
-int Mod_Q1BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents)
+int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents)
{
switch(nativecontents)
{
return 0;
}
-int Mod_Q1BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents)
+int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents)
{
if (supercontents & (SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY))
return CONTENTS_SOLID;
// we reached a leaf contents
// check for empty
- num = Mod_Q1BSP_SuperContentsFromNativeContents(NULL, num);
+ num = Mod_Q1BSP_SuperContentsFromNativeContents(num);
if (!t->trace->startfound)
{
t->trace->startfound = true;
plane = planes + nodes[num].planenum;
num = nodes[num].children[(plane->type < 3 ? point[plane->type] : DotProduct(plane->normal, point)) < plane->dist];
}
- num = Mod_Q1BSP_SuperContentsFromNativeContents(NULL, num);
+ num = Mod_Q1BSP_SuperContentsFromNativeContents(num);
t->trace->startsupercontents |= num;
if (num & SUPERCONTENTS_LIQUIDSMASK)
t->trace->inwater = true;
plane = planes + nodes[num].planenum;
num = nodes[num].children[(plane->type < 3 ? point[plane->type] : DotProduct(plane->normal, point)) < plane->dist];
}
- return Mod_Q1BSP_SuperContentsFromNativeContents(NULL, num);
+ return Mod_Q1BSP_SuperContentsFromNativeContents(num);
}
void Collision_ClipTrace_Box(trace_t *trace, const vec3_t cmins, const vec3_t cmaxs, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, int boxsupercontents, int boxq3surfaceflags, const texture_t *boxtexture)
return Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode(t, model, node->children[side ^ 1], mid, p2);
}
leaf = (const mleaf_t *)node;
- side = Mod_Q1BSP_SuperContentsFromNativeContents(NULL, leaf->contents);
+ side = Mod_Q1BSP_SuperContentsFromNativeContents(leaf->contents);
if (!t->trace->startfound)
{
t->trace->startfound = true;
Con_DPrintf("Stats for q1bsp model \"%s\": %i faces, %i nodes, %i leafs, %i visleafs, %i visleafportals, mesh: %i vertices, %i triangles, %i surfaces\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals, loadmodel->surfmesh.num_vertices, loadmodel->surfmesh.num_triangles, loadmodel->num_surfaces);
}
-int Mod_Q2BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents)
+int Mod_Q2BSP_SuperContentsFromNativeContents(int nativecontents)
{
int supercontents = 0;
if (nativecontents & CONTENTSQ2_SOLID)
return supercontents;
}
-int Mod_Q2BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents)
+int Mod_Q2BSP_NativeContentsFromSuperContents(int supercontents)
{
int nativecontents = 0;
if (supercontents & SUPERCONTENTS_SOLID)
tx->q2contents |= Q2CONTENTS_SOLID;
if (tx->q2flags & (Q2SURF_HINT | Q2SURF_SKIP))
tx->q2contents = 0;
- tx->supercontents = Mod_Q2BSP_SuperContentsFromNativeContents(loadmodel, tx->q2contents);
+ tx->supercontents = Mod_Q2BSP_SuperContentsFromNativeContents(tx->q2contents);
// set the current values to the base values
tx->currentframe = tx;
tx->currentskinframe = tx->materialshaderpass != NULL ? tx->materialshaderpass->skinframes[0] : NULL;
out->firstbrushside = loadmodel->brush.data_brushsides + firstside;
out->numbrushsides = numsides;
// convert the contents to our values
- supercontents = Mod_Q2BSP_SuperContentsFromNativeContents(loadmodel, contents);
+ supercontents = Mod_Q2BSP_SuperContentsFromNativeContents(contents);
// problem: q2bsp brushes have contents but not a texture
// problem: q2bsp brushsides *may* have a texture or may not
Con_DPrintf("Stats for q2bsp model \"%s\": %i faces, %i nodes, %i leafs, %i clusters, %i clusterportals, mesh: %i vertices, %i triangles, %i surfaces\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals, loadmodel->surfmesh.num_vertices, loadmodel->surfmesh.num_triangles, loadmodel->num_surfaces);
}
-static int Mod_Q3BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents);
-static int Mod_Q3BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents);
+static int Mod_Q3BSP_SuperContentsFromNativeContents(int nativecontents);
+static int Mod_Q3BSP_NativeContentsFromSuperContents(int supercontents);
static void Mod_Q3BSP_LoadEntities(lump_t *l)
{
for (i = 0;i < count;i++)
{
out[i].surfaceflags = LittleLong(in[i].surfaceflags);
- out[i].supercontents = Mod_Q3BSP_SuperContentsFromNativeContents(loadmodel, LittleLong(in[i].contents));
+ out[i].supercontents = Mod_Q3BSP_SuperContentsFromNativeContents(LittleLong(in[i].contents));
Mod_LoadTextureFromQ3Shader(out + i, in[i].name, true, true, TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS);
// restore the surfaceflags and supercontents
out[i].surfaceflags = LittleLong(in[i].surfaceflags);
- out[i].supercontents = Mod_Q3BSP_SuperContentsFromNativeContents(loadmodel, LittleLong(in[i].contents));
+ out[i].supercontents = Mod_Q3BSP_SuperContentsFromNativeContents(LittleLong(in[i].contents));
}
}
return out;
}
-static int Mod_Q3BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents)
+static int Mod_Q3BSP_SuperContentsFromNativeContents(int nativecontents)
{
int supercontents = 0;
if (nativecontents & CONTENTSQ3_SOLID)
return supercontents;
}
-static int Mod_Q3BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents)
+static int Mod_Q3BSP_NativeContentsFromSuperContents(int supercontents)
{
int nativecontents = 0;
if (supercontents & SUPERCONTENTS_SOLID)
shadowmesh_t *collisionmesh;
// common functions
- int (*SuperContentsFromNativeContents)(struct model_s *model, int nativecontents);
- int (*NativeContentsFromSuperContents)(struct model_s *model, int supercontents);
+ int (*SuperContentsFromNativeContents)(int nativecontents);
+ int (*NativeContentsFromSuperContents)(int supercontents);
unsigned char *(*GetPVS)(struct model_s *model, const vec3_t p);
int (*FatPVS)(struct model_s *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbufferlength, qboolean merge);
int (*BoxTouchingPVS)(struct model_s *model, const unsigned char *pvs, const vec3_t mins, const vec3_t maxs);
// bsp models
void Mod_BrushInit(void);
// used for talking to the QuakeC mainly
-int Mod_Q1BSP_NativeContentsFromSuperContents(struct model_s *model, int supercontents);
-int Mod_Q1BSP_SuperContentsFromNativeContents(struct model_s *model, int nativecontents);
+int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents);
+int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents);
// used for loading wal files in Mod_LoadTextureFromQ3Shader
-int Mod_Q2BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents);
-int Mod_Q2BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents);
+int Mod_Q2BSP_SuperContentsFromNativeContents(int nativecontents);
+int Mod_Q2BSP_NativeContentsFromSuperContents(int supercontents);
// a lot of model formats use the Q1BSP code, so here are the prototypes...
struct entity_render_s;