]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - portals.c
cmd: Rename cbuf_t to cmd_buf_t
[xonotic/darkplaces.git] / portals.c
index 3b770f9ea40c79cbf4b55bf8d77bcee9e16e0d5e..7cd20a5d768bb3a8ab759c436789e3c176095d33 100644 (file)
--- a/portals.c
+++ b/portals.c
@@ -1,6 +1,7 @@
 
 #include "quakedef.h"
 #include "polygon.h"
+#include "portals.h"
 
 #define MAXRECURSIVEPORTALPLANES 1024
 #define MAXRECURSIVEPORTALS 256
@@ -324,8 +325,8 @@ static void Portal_RecursiveFlow (portalrecursioninfo_t *info, mleaf_t *leaf, in
                        msurface_t *surface = info->model->data_surfaces + surfaceindex;
                        if (BoxesOverlap(surface->mins, surface->maxs, info->boxmins, info->boxmaxs))
                        {
-                               qboolean insidebox = BoxInsideBox(surface->mins, surface->maxs, info->boxmins, info->boxmaxs);
-                               qboolean addedtris = false;
+                               qbool insidebox = BoxInsideBox(surface->mins, surface->maxs, info->boxmins, info->boxmaxs);
+                               qbool addedtris = false;
                                int t, tend;
                                const int *elements;
                                const float *vertex3f;
@@ -338,7 +339,7 @@ static void Portal_RecursiveFlow (portalrecursioninfo_t *info, mleaf_t *leaf, in
                                        VectorCopy(vertex3f + elements[1] * 3, v + 3);
                                        VectorCopy(vertex3f + elements[2] * 3, v + 6);
                                        if (PointInfrontOfTriangle(info->eye, v + 0, v + 3, v + 6)
-                                        && (insidebox || TriangleOverlapsBox(v, v + 3, v + 6, info->boxmins, info->boxmaxs))
+                                        && (insidebox || TriangleBBoxOverlapsBox(v, v + 3, v + 6, info->boxmins, info->boxmaxs))
                                         && (!info->exact || Portal_PortalThroughPortalPlanes(&portalplanes[firstclipplane], numclipplanes, v, 3, &portaltemppoints2[0][0], 256) > 0))
                                        {
                                                addedtris = true;