_farplanedist now ignores C_SKY leafs
[xonotic/netradiant.git] / tools / quake3 / q3map2 / vis.c
index b92919226af604a9089019940bcb33f8410c3a5c..87fb3a3122fefc9d876358dcd3eceab83bc9fc76 100644 (file)
@@ -870,7 +870,7 @@ LoadPortals
 */
 void LoadPortals (char *name)
 {
-       int                     i, j, hint;
+       int                     i, j, flags;
        vportal_t       *p;
        leaf_t          *l;
        char            magic[80];
@@ -935,8 +935,8 @@ void LoadPortals (char *name)
                if (leafnums[0] > portalclusters
                || leafnums[1] > portalclusters)
                        Error ("LoadPortals: reading portal %i", i);
-               if (fscanf (f, "%i ", &hint) != 1)
-                       Error ("LoadPortals: reading hint state");
+               if (fscanf (f, "%i ", &flags) != 1)
+                       Error ("LoadPortals: reading flags");
                
                w = p->winding = NewFixedWinding (numpoints);
                w->numpoints = numpoints;
@@ -970,7 +970,8 @@ void LoadPortals (char *name)
                l->numportals++;
                
                p->num = i+1;
-               p->hint = hint;
+               p->hint = ((flags & 1) != 0);
+               p->sky = ((flags & 2) != 0);
                p->winding = w;
                VectorSubtract (vec3_origin, plane.normal, p->plane.normal);
                p->plane.dist = -plane.dist;