]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/visflow.c
Merge commit '70f0925f0000a132c709b935aa5cb0942b5080d9' into master-merge
[xonotic/netradiant.git] / tools / quake3 / q3map2 / visflow.c
index 547a7291c5be32ab21ae338f74b6f695d2144aac..adc0676110c942e492a094d17d6ddc5592d5bc36 100644 (file)
@@ -1608,8 +1608,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;