]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
Rename qboolean to qbool
[xonotic/darkplaces.git] / model_brush.c
index 934791bec3bc1d0b800e8dc276d53f2ef4db3a67..8c31924ad8b2b4cc5eae7dec4b8a4fed7203e9ed 100644 (file)
@@ -73,7 +73,7 @@ static texture_t mod_q1bsp_texture_lava;
 static texture_t mod_q1bsp_texture_slime;
 static texture_t mod_q1bsp_texture_water;
 
-static qboolean Mod_Q3BSP_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs);
+static qbool Mod_Q3BSP_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs);
 
 void Mod_BrushInit(void)
 {
@@ -1176,14 +1176,14 @@ void Collision_ClipTrace_Point(trace_t *trace, const vec3_t cmins, const vec3_t
        }
 }
 
-static qboolean Mod_Q1BSP_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs)
+static qbool Mod_Q1BSP_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs)
 {
        trace_t trace;
        Mod_Q1BSP_TraceLine(model, NULL, NULL, &trace, start, end, SUPERCONTENTS_VISBLOCKERMASK, 0, MATERIALFLAGMASK_TRANSLUCENT);
        return trace.fraction == 1 || BoxesOverlap(trace.endpos, trace.endpos, acceptmins, acceptmaxs);
 }
 
-static int Mod_Q1BSP_LightPoint_RecursiveBSPNode(dp_model_t *model, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal, const mnode_t *node, float x, float y, float startz, float endz)
+static int Mod_BSP_LightPoint_RecursiveBSPNode(dp_model_t *model, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal, const mnode_t *node, float x, float y, float startz, float endz)
 {
        int side;
        float front, back;
@@ -1225,7 +1225,7 @@ static int Mod_Q1BSP_LightPoint_RecursiveBSPNode(dp_model_t *model, vec3_t ambie
                }
 
                // go down front side
-               if (node->children[side]->plane && Mod_Q1BSP_LightPoint_RecursiveBSPNode(model, ambientcolor, diffusecolor, diffusenormal, node->children[side], x, y, startz, mid))
+               if (node->children[side]->plane && Mod_BSP_LightPoint_RecursiveBSPNode(model, ambientcolor, diffusecolor, diffusenormal, node->children[side], x, y, startz, mid))
                        return true;    // hit something
 
                // check for impact on this node
@@ -1339,7 +1339,7 @@ static void Mod_BSP_LightPoint(dp_model_t *model, const vec3_t p, vec3_t ambient
                return;
        }
 
-       Mod_Q1BSP_LightPoint_RecursiveBSPNode(model, ambientcolor, diffusecolor, diffusenormal, model->brush.data_nodes + model->brushq1.hulls[0].firstclipnode, p[0], p[1], p[2] + 0.125, p[2] - 65536);
+       Mod_BSP_LightPoint_RecursiveBSPNode(model, ambientcolor, diffusecolor, diffusenormal, model->brush.data_nodes + model->brushq1.hulls[0].firstclipnode, p[0], p[1], p[2] + 0.125, p[2] - 65536);
 }
 
 static const texture_t *Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(RecursiveHullCheckTraceInfo_t *t, const dp_model_t *model, const mnode_t *node, double mid[3])
@@ -1526,7 +1526,7 @@ static void Mod_Q1BSP_TraceLineAgainstSurfaces(struct model_s *model, const fram
        VectorMA(rhc.start, rhc.trace->fraction, rhc.dist, rhc.trace->endpos);
 }
 
-static void Mod_Q1BSP_DecompressVis(const unsigned char *in, const unsigned char *inend, unsigned char *out, unsigned char *outend)
+static void Mod_BSP_DecompressVis(const unsigned char *in, const unsigned char *inend, unsigned char *out, unsigned char *outend)
 {
        int c;
        unsigned char *outstart = out;
@@ -1534,7 +1534,7 @@ static void Mod_Q1BSP_DecompressVis(const unsigned char *in, const unsigned char
        {
                if (in == inend)
                {
-                       Con_Printf("Mod_Q1BSP_DecompressVis: input underrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, (int)(out - outstart), (int)(outend - outstart));
+                       Con_Printf("Mod_BSP_DecompressVis: input underrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, (int)(out - outstart), (int)(outend - outstart));
                        return;
                }
                c = *in++;
@@ -1544,14 +1544,14 @@ static void Mod_Q1BSP_DecompressVis(const unsigned char *in, const unsigned char
                {
                        if (in == inend)
                        {
-                               Con_Printf("Mod_Q1BSP_DecompressVis: input underrun (during zero-run) on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, (int)(out - outstart), (int)(outend - outstart));
+                               Con_Printf("Mod_BSP_DecompressVis: input underrun (during zero-run) on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, (int)(out - outstart), (int)(outend - outstart));
                                return;
                        }
                        for (c = *in++;c > 0;c--)
                        {
                                if (out == outend)
                                {
-                                       Con_Printf("Mod_Q1BSP_DecompressVis: output overrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, (int)(out - outstart), (int)(outend - outstart));
+                                       Con_Printf("Mod_BSP_DecompressVis: output overrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, (int)(out - outstart), (int)(outend - outstart));
                                        return;
                                }
                                *out++ = 0;
@@ -2278,14 +2278,14 @@ static void Mod_Q1BSP_LoadVertexes(sizebuf_t *sb)
        }
 }
 
-static void Mod_Q1BSP_LoadSubmodels(sizebuf_t *sb, hullinfo_t *hullinfo)
+static void Mod_BSP_LoadSubmodels(sizebuf_t *sb, hullinfo_t *hullinfo)
 {
        mmodel_t        *out;
        int                     i, j, count;
-       int                     structsize = (48+4*hullinfo->filehulls);
+       int                     structsize = hullinfo ? (48+4*hullinfo->filehulls) : 48;
 
        if (sb->cursize % structsize)
-               Host_Error ("Mod_Q1BSP_LoadSubmodels: funny lump size in %s", loadmodel->name);
+               Host_Error ("Mod_BSP_LoadSubmodels: funny lump size in %s", loadmodel->name);
 
        count = sb->cursize / structsize;
        out = (mmodel_t *)Mem_Alloc (loadmodel->mempool, count*sizeof(*out));
@@ -2305,9 +2305,15 @@ static void Mod_Q1BSP_LoadSubmodels(sizebuf_t *sb, hullinfo_t *hullinfo)
                out->origin[0] = MSG_ReadLittleFloat(sb);
                out->origin[1] = MSG_ReadLittleFloat(sb);
                out->origin[2] = MSG_ReadLittleFloat(sb);
-               for (j = 0; j < hullinfo->filehulls; j++)
-                       out->headnode[j] = MSG_ReadLittleLong(sb);
-               out->visleafs  = MSG_ReadLittleLong(sb);
+               if(hullinfo)
+               {
+                       for (j = 0; j < hullinfo->filehulls; j++)
+                               out->headnode[j] = MSG_ReadLittleLong(sb);
+                       out->visleafs  = MSG_ReadLittleLong(sb);
+               }
+               else // Quake 2 has only one hull
+                       out->headnode[0] = MSG_ReadLittleLong(sb);
+
                out->firstface = MSG_ReadLittleLong(sb);
                out->numfaces  = MSG_ReadLittleLong(sb);
        }
@@ -2828,16 +2834,16 @@ static void Mod_Q1BSP_LoadFaces(sizebuf_t *sb)
                        loadmodel->surfmesh.data_element3s[i] = loadmodel->surfmesh.data_element3i[i];
 }
 
-static void Mod_Q1BSP_LoadNodes_RecursiveSetParent(mnode_t *node, mnode_t *parent)
+static void Mod_BSP_LoadNodes_RecursiveSetParent(mnode_t *node, mnode_t *parent)
 {
        //if (node->parent)
-       //      Host_Error("Mod_Q1BSP_LoadNodes_RecursiveSetParent: runaway recursion");
+       //      Host_Error("Mod_BSP_LoadNodes_RecursiveSetParent: runaway recursion");
        node->parent = parent;
        if (node->plane)
        {
                // this is a node, recurse to children
-               Mod_Q1BSP_LoadNodes_RecursiveSetParent(node->children[0], node);
-               Mod_Q1BSP_LoadNodes_RecursiveSetParent(node->children[1], node);
+               Mod_BSP_LoadNodes_RecursiveSetParent(node->children[0], node);
+               Mod_BSP_LoadNodes_RecursiveSetParent(node->children[1], node);
                // combine supercontents of children
                node->combinedsupercontents = node->children[0]->combinedsupercontents | node->children[1]->combinedsupercontents;
        }
@@ -2966,7 +2972,7 @@ static void Mod_Q1BSP_LoadNodes(sizebuf_t *sb)
                }
        }
 
-       Mod_Q1BSP_LoadNodes_RecursiveSetParent(loadmodel->brush.data_nodes, NULL);      // sets nodes and leafs
+       Mod_BSP_LoadNodes_RecursiveSetParent(loadmodel->brush.data_nodes, NULL);        // sets nodes and leafs
 }
 
 static void Mod_Q1BSP_LoadLeafs(sizebuf_t *sb)
@@ -3004,7 +3010,7 @@ static void Mod_Q1BSP_LoadLeafs(sizebuf_t *sb)
                        if (p >= loadmodel->brushq1.num_compressedpvs)
                                Con_Print("Mod_Q1BSP_LoadLeafs: invalid visofs\n");
                        else
-                               Mod_Q1BSP_DecompressVis(loadmodel->brushq1.data_compressedpvs + p, loadmodel->brushq1.data_compressedpvs + loadmodel->brushq1.num_compressedpvs, loadmodel->brush.data_pvsclusters + out->clusterindex * loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.data_pvsclusters + (out->clusterindex + 1) * loadmodel->brush.num_pvsclusterbytes);
+                               Mod_BSP_DecompressVis(loadmodel->brushq1.data_compressedpvs + p, loadmodel->brushq1.data_compressedpvs + loadmodel->brushq1.num_compressedpvs, loadmodel->brush.data_pvsclusters + out->clusterindex * loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.data_pvsclusters + (out->clusterindex + 1) * loadmodel->brush.num_pvsclusterbytes);
                }
 
                if (loadmodel->brush.isbsp2rmqe)
@@ -3061,7 +3067,7 @@ static void Mod_Q1BSP_LoadLeafs(sizebuf_t *sb)
        }
 }
 
-static qboolean Mod_Q1BSP_CheckWaterAlphaSupport(void)
+static qbool Mod_Q1BSP_CheckWaterAlphaSupport(void)
 {
        int i, j;
        mleaf_t *leaf;
@@ -3262,7 +3268,7 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
 #if 0
 // unfinished
        int submodel, numbrushes;
-       qboolean firstbrush;
+       qbool firstbrush;
        char *text, *maptext;
        char mapfilename[MAX_QPATH];
        FS_StripExtension (loadmodel->name, mapfilename, sizeof (mapfilename));
@@ -3798,7 +3804,7 @@ static void Mod_BSP_FatPVS_RecursiveBSPNode(dp_model_t *model, const vec3_t org,
 
 //Calculates a PVS that is the inclusive or of all leafs within radius pixels
 //of the given point.
-static int Mod_BSP_FatPVS(dp_model_t *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbufferlength, qboolean merge)
+static int Mod_BSP_FatPVS(dp_model_t *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbufferlength, qbool merge)
 {
        int bytes = model->brush.num_pvsclusterbytes;
        bytes = min(bytes, pvsbufferlength);
@@ -3887,11 +3893,6 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        mod->type = mod_brushq1;
 
-       mod->brush.ishlbsp = false;
-       mod->brush.isbsp2rmqe = false;
-       mod->brush.isbsp2 = false;
-       mod->brush.isq2bsp = false;
-       mod->brush.isq3bsp = false;
        mod->brush.skymasking = true;
        i = MSG_ReadLittleLong(&sb);
 
@@ -3987,7 +3988,7 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
        Mod_Q1BSP_LoadLeaffaces(&lumpsb[LUMP_MARKSURFACES]);
        Mod_Q1BSP_LoadVisibility(&lumpsb[LUMP_VISIBILITY]);
        // load submodels before leafs because they contain the number of vis leafs
-       Mod_Q1BSP_LoadSubmodels(&lumpsb[LUMP_MODELS], &hullinfo);
+       Mod_BSP_LoadSubmodels(&lumpsb[LUMP_MODELS], &hullinfo);
        Mod_Q1BSP_LoadLeafs(&lumpsb[LUMP_LEAFS]);
        Mod_Q1BSP_LoadNodes(&lumpsb[LUMP_NODES]);
        Mod_Q1BSP_LoadClipnodes(&lumpsb[LUMP_CLIPNODES], &hullinfo);
@@ -4095,7 +4096,7 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
                mod->nummodelsurfaces = bm->numfaces;
 
                // set node/leaf parents for this submodel
-               Mod_Q1BSP_LoadNodes_RecursiveSetParent(mod->brush.data_nodes + mod->brushq1.hulls[0].firstclipnode, NULL);
+               Mod_BSP_LoadNodes_RecursiveSetParent(mod->brush.data_nodes + mod->brushq1.hulls[0].firstclipnode, NULL);
 
                // this has to occur after hull info has been set, as it uses Mod_Q1BSP_PointSuperContents
                Mod_Q1BSP_AssignNoShadowSkySurfaces(mod);
@@ -4284,7 +4285,7 @@ static void Mod_Q2BSP_LoadVisibility(sizebuf_t *sb)
                /*int phsofs = */MSG_ReadLittleLong(sb);
                // decompress the vis data for this cluster
                // (note this accesses the underlying data store of sb, which is kind of evil)
-               Mod_Q1BSP_DecompressVis(sb->data + pvsofs, sb->data + sb->cursize, loadmodel->brush.data_pvsclusters + i * loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.data_pvsclusters + (i+1) * loadmodel->brush.num_pvsclusterbytes);
+               Mod_BSP_DecompressVis(sb->data + pvsofs, sb->data + sb->cursize, loadmodel->brush.data_pvsclusters + i * loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.data_pvsclusters + (i+1) * loadmodel->brush.num_pvsclusterbytes);
        }
        // hush the loading error check later - we had to do random access on this lump, so we didn't read to the end
        sb->readcount = sb->cursize;
@@ -4356,7 +4357,7 @@ static void Mod_Q2BSP_LoadNodes(sizebuf_t *sb)
                }
        }
 
-       Mod_Q1BSP_LoadNodes_RecursiveSetParent(loadmodel->brush.data_nodes, NULL);      // sets nodes and leafs
+       Mod_BSP_LoadNodes_RecursiveSetParent(loadmodel->brush.data_nodes, NULL);        // sets nodes and leafs
 }
 
 static void Mod_Q2BSP_LoadTexinfo(sizebuf_t *sb)
@@ -4698,7 +4699,7 @@ static void Mod_Q2BSP_LoadBrushes(sizebuf_t *sb)
        int i, j, firstside, numsides, contents, count, maxplanes, q3surfaceflags, supercontents;
        colplanef_t *planes;
        int structsize = 12;
-       qboolean brushmissingtextures;
+       qbool brushmissingtextures;
        int numbrushesmissingtextures = 0;
        int numcreatedtextures = 0;
 
@@ -4811,40 +4812,6 @@ static void Mod_Q2BSP_LoadAreaPortals(sizebuf_t *sb)
        sb->readcount = sb->cursize;
 }
 
-static void Mod_Q2BSP_LoadSubmodels(sizebuf_t *sb)
-{
-       mmodel_t        *out;
-       int                     i, count;
-       int                     structsize = 48;
-
-       if (sb->cursize % structsize)
-               Host_Error ("Mod_Q2BSP_LoadSubmodels: funny lump size in %s", loadmodel->name);
-
-       count = sb->cursize / structsize;
-       out = (mmodel_t *)Mem_Alloc (loadmodel->mempool, count*sizeof(*out));
-
-       loadmodel->brushq1.submodels = out;
-       loadmodel->brush.numsubmodels = count;
-
-       // this is identical to the q1 submodel structure except for having 1 hull
-       for (i = 0; i < count; i++, out++)
-       {
-               // spread out the mins / maxs by a pixel
-               out->mins[0] = MSG_ReadLittleFloat(sb) - 1;
-               out->mins[1] = MSG_ReadLittleFloat(sb) - 1;
-               out->mins[2] = MSG_ReadLittleFloat(sb) - 1;
-               out->maxs[0] = MSG_ReadLittleFloat(sb) + 1;
-               out->maxs[1] = MSG_ReadLittleFloat(sb) + 1;
-               out->maxs[2] = MSG_ReadLittleFloat(sb) + 1;
-               out->origin[0] = MSG_ReadLittleFloat(sb);
-               out->origin[1] = MSG_ReadLittleFloat(sb);
-               out->origin[2] = MSG_ReadLittleFloat(sb);
-               out->headnode[0] = MSG_ReadLittleLong(sb);
-               out->firstface = MSG_ReadLittleLong(sb);
-               out->numfaces  = MSG_ReadLittleLong(sb);
-       }
-}
-
 static void Mod_Q2BSP_FindSubmodelBrushRange_r(dp_model_t *mod, mnode_t *node, int *first, int *last)
 {
        int i;
@@ -4972,7 +4939,7 @@ static void Mod_Q2BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
        Mod_Q2BSP_LoadAreaPortals(&lumpsb[Q2LUMP_AREAPORTALS]);
        Mod_Q2BSP_LoadLeafs(&lumpsb[Q2LUMP_LEAFS]);
        Mod_Q2BSP_LoadNodes(&lumpsb[Q2LUMP_NODES]);
-       Mod_Q2BSP_LoadSubmodels(&lumpsb[Q2LUMP_MODELS]);
+       Mod_BSP_LoadSubmodels(&lumpsb[Q2LUMP_MODELS], NULL);
 
        for (i = 0; i < Q2HEADER_LUMPS; i++)
                if (lumpsb[i].readcount != lumpsb[i].cursize)
@@ -5066,7 +5033,7 @@ static void Mod_Q2BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
                        rootnode = mod->brush.data_nodes + bm->headnode[0];
                else
                        rootnode = (mnode_t*)(mod->brush.data_leafs + -1 - bm->headnode[0]);
-               Mod_Q1BSP_LoadNodes_RecursiveSetParent(rootnode, NULL);
+               Mod_BSP_LoadNodes_RecursiveSetParent(rootnode, NULL);
 
                // make the model surface list (used by shadowing/lighting)
                mod->sortedmodelsurfaces = (int *)datapointer;datapointer += mod->nummodelsurfaces * sizeof(int);
@@ -5577,7 +5544,7 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
        unsigned char *mergeddeluxepixels;
        unsigned char *mergebuf;
        char mapname[MAX_QPATH];
-       qboolean external;
+       qbool external;
        unsigned char *inpixels[10000]; // max count q3map2 can output (it uses 4 digits)
        char vabuf[1024];
 
@@ -5613,19 +5580,16 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
        {
                // no internal lightmaps
                // try external lightmaps
-               if (developer_loading.integer)
-                       Con_Printf("Using external lightmaps\n");
                FS_StripExtension(loadmodel->name, mapname, sizeof(mapname));
                inpixels[0] = loadimagepixelsbgra(va(vabuf, sizeof(vabuf), "%s/lm_%04d", mapname, 0), false, false, false, NULL);
                if(!inpixels[0])
                        return;
+               else
+                       Con_Printf("Using external lightmaps\n");
 
                // using EXTERNAL lightmaps instead
                if(image_width != (int) CeilPowerOf2(image_width) || image_width != image_height)
-               {
-                       Mem_Free(inpixels[0]);
-                       Host_Error("Mod_Q3BSP_LoadLightmaps: invalid external lightmap size in %s",loadmodel->name);
-               }
+                       Con_Printf("Mod_Q3BSP_LoadLightmaps: irregularly sized external lightmap in %s",loadmodel->name);
 
                size = image_width;
                bytesperpixel = 4;
@@ -5714,7 +5678,7 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
                }
        }
 
-       Con_DPrintf("%s is %sdeluxemapped\n", loadmodel->name, loadmodel->brushq3.deluxemapping ? "" : "not ");
+       Con_Printf("%s is %sdeluxemapped\n", loadmodel->name, loadmodel->brushq3.deluxemapping ? "" : "not ");
 
        // figure out what the most reasonable merge power is within limits
 
@@ -5860,7 +5824,7 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
        float *v;
        patchtess_t *patchtess = NULL;
        int patchtesscount = 0;
-       qboolean again;
+       qbool again;
 
        in = (q3dface_t *)(mod_base + l->fileofs);
        if (l->filelen % sizeof(*in))
@@ -6474,7 +6438,7 @@ static void Mod_Q3BSP_LoadNodes(lump_t *l)
        }
 
        // set the parent pointers
-       Mod_Q1BSP_LoadNodes_RecursiveSetParent(loadmodel->brush.data_nodes, NULL);
+       Mod_BSP_LoadNodes_RecursiveSetParent(loadmodel->brush.data_nodes, NULL);
 }
 
 static void Mod_Q3BSP_LoadLightGrid(lump_t *l)
@@ -6806,7 +6770,7 @@ static int Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck(mnode_t *node, double p
        return ((mleaf_t *)node)->clusterindex < 0;
 }
 
-static qboolean Mod_Q3BSP_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs)
+static qbool Mod_Q3BSP_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs)
 {
        if (model->brush.submodel || mod_q3bsp_tracelineofsight_brushes.integer)
        {
@@ -7196,7 +7160,7 @@ int Mod_CollisionBIH_PointSuperContents(struct model_s *model, int frame, const
        return trace.startsupercontents;
 }
 
-qboolean Mod_CollisionBIH_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs)
+qbool Mod_CollisionBIH_TraceLineOfSight(struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs)
 {
        trace_t trace;
        Mod_CollisionBIH_TraceLine(model, NULL, NULL, &trace, start, end, SUPERCONTENTS_VISBLOCKERMASK, 0, MATERIALFLAGMASK_TRANSLUCENT);
@@ -7253,7 +7217,7 @@ void Mod_CollisionBIH_TraceLineAgainstSurfaces(dp_model_t *model, const frameble
 }
 
 
-bih_t *Mod_MakeCollisionBIH(dp_model_t *model, qboolean userendersurfaces, bih_t *out)
+bih_t *Mod_MakeCollisionBIH(dp_model_t *model, qbool userendersurfaces, bih_t *out)
 {
        int j;
        int bihnumleafs;