]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - portals.c
remove unused PRVM_SetQCString function
[xonotic/darkplaces.git] / portals.c
index 7d79b32cb082c272d3cc1047d1ee22a571edd7cd..88896dd7f04bff983c30f2caa8d9744b8b3f4e13 100644 (file)
--- a/portals.c
+++ b/portals.c
@@ -319,7 +319,7 @@ void Portal_RecursiveFlow (portalrecursioninfo_t *info, mleaf_t *leaf, int first
                        int surfaceindex = leaf->firstleafsurface[i];
                        if (!CHECKPVSBIT(info->surfacepvs, surfaceindex))
                        {
-                               msurface_t *surface = info->model->brush.data_surfaces + surfaceindex;
+                               msurface_t *surface = info->model->data_surfaces + surfaceindex;
                                if (BoxesOverlap(surface->mins, surface->maxs, info->boxmins, info->boxmaxs))
                                {
                                        if (info->exact)
@@ -419,7 +419,7 @@ void Portal_RecursiveFindLeafForFlow(portalrecursioninfo_t *info, mnode_t *node)
        else
        {
                mleaf_t *leaf = (mleaf_t *)node;
-               if (leaf->portals)
+               if (leaf->clusterindex >= 0)
                        Portal_RecursiveFlow(info, leaf, 0, info->numfrustumplanes);
        }
 }
@@ -438,7 +438,7 @@ void Portal_Visibility(model_t *model, const vec3_t eye, int *leaflist, qbyte *l
 
        Mod_CheckLoaded(model);
 
-       if (!model->brush.num_portals)
+       if (!model->brush.data_nodes)
        {
                Con_Print("Portal_Visibility: not a brush model\n");
                return;