portal_markid++;
Mod_CheckLoaded(model);
- Portal_PolygonRecursiveMarkLeafs(model->brushq1.nodes, polypoints, numpoints);
+ Portal_PolygonRecursiveMarkLeafs(model->brush.data_nodes, polypoints, numpoints);
eyeleaf = model->brushq1.PointInLeaf(model, eye);
}
portalrecursioninfo_t;
-void Portal_RecursiveFlow_ExactMarkSurfaces(portalrecursioninfo_t *info, int *mark, int nummarksurfaces, int firstclipplane, int numclipplanes)
+void Portal_RecursiveFlow_ExactLeafFaces(portalrecursioninfo_t *info, int *mark, int numleaffaces, int firstclipplane, int numclipplanes)
{
int i, j, *elements;
vec3_t trimins, trimaxs;
msurface_t *surf;
- for (i = 0;i < nummarksurfaces;i++, mark++)
+ for (i = 0;i < numleaffaces;i++, mark++)
{
if (!info->surfacemark[*mark])
{
}
if (info->leafmark)
- info->leafmark[leaf - info->model->brushq1.data_leafs] = true;
+ info->leafmark[leaf - info->model->brush.data_leafs] = true;
// mark surfaces in leaf that can be seen through portal
- if (leaf->nummarksurfaces && info->surfacemark)
+ if (leaf->numleaffaces && info->surfacemark)
{
if (info->exact)
- Portal_RecursiveFlow_ExactMarkSurfaces(info, leaf->firstmarksurface, leaf->nummarksurfaces, firstclipplane, numclipplanes);
+ Portal_RecursiveFlow_ExactLeafFaces(info, leaf->firstleafface, leaf->numleaffaces, firstclipplane, numclipplanes);
else
- for (i = 0;i < leaf->nummarksurfaces;i++)
- info->surfacemark[leaf->firstmarksurface[i]] = true;
+ for (i = 0;i < leaf->numleaffaces;i++)
+ info->surfacemark[leaf->firstleafface[i]] = true;
}
// follow portals into other leafs
Mod_CheckLoaded(model);
- if (!model->brushq1.numportals)
+ if (!model->brush.num_portals)
{
Con_Print("Portal_Visibility: not a brush model\n");
return;
info.updateleafsmins = updateleafsmins;
info.updateleafsmaxs = updateleafsmaxs;
- Portal_RecursiveFindLeafForFlow(&info, model->brushq1.nodes);
+ Portal_RecursiveFindLeafForFlow(&info, model->brush.data_nodes);
if (ranoutofportalplanes)
Con_Printf("Portal_RecursiveFlow: ran out of %d plane stack when recursing through portals\n", MAXRECURSIVEPORTALPLANES);