From e0cd5edddbdfa18d1a10508699c97a60bfae1b00 Mon Sep 17 00:00:00 2001 From: mittorn Date: Thu, 4 Apr 2019 02:38:57 +0700 Subject: [PATCH] ref_soft: Ignore non-horizontal water planes --- r_bsp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/r_bsp.c b/r_bsp.c index a9640f22..01229af4 100644 --- a/r_bsp.c +++ b/r_bsp.c @@ -663,6 +663,13 @@ void R_DrawSolidClippedSubmodelPolygons (model_t *pmodel, mnode_t *topnode) for (i=0 ; iflags, SURF_DRAWTURB ) && !ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE )) + { + if( psurf->plane->type != PLANE_Z && !FBitSet( RI.currententity->curstate.effects, EF_WATERSIDES )) + continue; + if( r_entorigin[2] + pmodel->mins[2] + 1.0 >= psurf->plane->dist ) + continue; + } // find which side of the node we are on pplane = psurf->plane; @@ -738,6 +745,13 @@ void R_DrawSubmodelPolygons (model_t *pmodel, int clipflags, mnode_t *topnode) for (i=0 ; iflags, SURF_DRAWTURB ) && !ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE )) + { + if( psurf->plane->type != PLANE_Z && !FBitSet( RI.currententity->curstate.effects, EF_WATERSIDES )) + continue; + if( r_entorigin[2] + pmodel->mins[2] + 1.0 >= psurf->plane->dist ) + continue; + } // find which side of the node we are on pplane = psurf->plane;