]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/prtfile.c
Merge branch 'master' into divVerent/farplanedist-sky-fix
[xonotic/netradiant.git] / tools / quake3 / q3map2 / prtfile.c
index b5c09484156c3290bfc749a378a512ca0b624f23..514d255f7b556ba2ce35597a04a1feb874f35f38 100644 (file)
@@ -102,7 +102,7 @@ void CountVisportals_r( node_t *node ){
    =================
  */
 void WritePortalFile_r( node_t *node ){
-       int i, s;
+       int i, s, flags;
        portal_t    *p;
        winding_t   *w;
        vec3_t normal;
@@ -146,14 +146,20 @@ void WritePortalFile_r( node_t *node ){
                                fprintf( pf,"%i %i %i ",w->numpoints, p->nodes[0]->cluster, p->nodes[1]->cluster );
                        }
 
+                       flags = 0;
+
                        /* ydnar: added this change to make antiportals work */
-                       if ( p->compileFlags & C_HINT ) {
-                               fprintf( pf, "1 " );
+                       if( p->compileFlags & C_HINT ) {
+                               flags |= 1;
                        }
-                       else{
-                               fprintf( pf, "0 " );
+
+                       /* divVerent: I want farplanedist to not kill skybox. So... */
+                       if( p->compileFlags & C_SKY ) {
+                               flags |= 2;
                        }
 
+                       fprintf( pf, "%d ", flags );
+
                        /* write the winding */
                        for ( i = 0 ; i < w->numpoints ; i++ )
                        {