]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/visflow.c
Q3map2:
[xonotic/netradiant.git] / tools / quake3 / q3map2 / visflow.c
index 5a7ffd92de65c6ed8cc77889b3a22e07e76aa666..0247691f9f046d44dd910f78eb00f0f4dfa3e7e5 100644 (file)
@@ -1614,8 +1614,28 @@ void BasePortalVis( int portalnum ){
                   }
                 */
 
+               if( !p->sky && !tp->sky && farPlaneDist != 0.0f && farPlaneDistMode == 'o' )
+               {
+                       VectorSubtract( p->origin, tp->origin, dir );
+                       if( VectorLength( dir ) > farPlaneDist )
+                               continue;
+               }
+
+               if( !p->sky && !tp->sky && farPlaneDist != 0.0f && farPlaneDistMode == 'e' )
+               {
+                       VectorSubtract( p->origin, tp->origin, dir );
+                       if( VectorLength( dir ) + p->radius + tp->radius > 2.0f * farPlaneDist )
+                               continue;
+               }
+
+               if( !p->sky && !tp->sky && farPlaneDist != 0.0f && farPlaneDistMode == 'r' )
+               {
+                       if( p->radius + tp->radius > farPlaneDist )
+                               continue;
+               }
+
                /* ydnar: this is known-to-be-working farplane code */
-               if ( !p->sky && !tp->sky && farPlaneDist > 0.0f ) {
+               if ( !p->sky && !tp->sky && farPlaneDist != 0.0f ) {
                        VectorSubtract( p->origin, tp->origin, dir );
                        if ( VectorLength( dir ) - p->radius - tp->radius > farPlaneDist ) {
                                continue;