]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/vis.c
Q3map2:
[xonotic/netradiant.git] / tools / quake3 / q3map2 / vis.c
index fb560d511311c911499c1719e50ed63376cb1757..fd3df83e26197e6ac4d5873babb377991859eaf3 100644 (file)
@@ -318,16 +318,25 @@ void CalcVis( void ){
        }
        if ( value[ 0 ] != '\0' ) {
                farPlaneDist = atof( value );
-               if ( farPlaneDist > 0.0f ) {
+               farPlaneDistMode = value[strlen(value) - 1 ];
+               if ( farPlaneDist != 0.0f ) {
                        Sys_Printf( "farplane distance = %.1f\n", farPlaneDist );
                }
-               else{
-                       farPlaneDist = 0.0f;
+                       if ( farPlaneDist != 0.0f && farPlaneDistMode == 'o' ) {
+                       Sys_Printf( "farplane Origin2Origin mode on\n" );
                }
+                       if ( farPlaneDist != 0.0f && farPlaneDistMode == 'r' ) {
+                       Sys_Printf( "farplane Radius+Radius mode on\n" );
+               }
+                       if ( farPlaneDist != 0.0f && farPlaneDistMode == 'e' ) {
+                       Sys_Printf( "farplane Exact distance mode on\n" );
+               }
+
        }
 
 
 
+
        Sys_Printf( "\n--- BasePortalVis (%d) ---\n", numportals * 2 );
        RunThreadsOnIndividual( numportals * 2, qtrue, BasePortalVis );
 
@@ -890,7 +899,7 @@ void WritePortals( char *filename ){
    ============
  */
 void LoadPortals( char *name ){
-       int i, j, hint;
+       int i, j, flags;
        vportal_t   *p;
        leaf_t      *l;
        char magic[80];
@@ -964,8 +973,8 @@ void LoadPortals( char *name ){
                         || 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 );
@@ -1001,7 +1010,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;