From 370ea3dbb1443c970cd42c6ca87cb9dbc51661c0 Mon Sep 17 00:00:00 2001 From: Christopher Bock Date: Fri, 11 Mar 2016 08:37:03 +0100 Subject: [PATCH] * Preventing player model from being drawn in the reflection as soon as it partially intersects with the water plane, else one will be able to see the player model's interiors --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index 35860d4f..41843baf 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -6202,7 +6202,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t memset(r_refdef.viewcache.world_pvsbits, 0xFF, r_refdef.scene.worldmodel->brush.num_pvsclusterbytes); } - r_fb.water.hideplayer = ((r_water_hideplayer.integer >= 2) && !chase_active.integer); + r_fb.water.hideplayer = ((r_water_hideplayer.integer >= 2) && !chase_active.integer) || (abs(planeDist) < 45); R_ResetViewRendering3D(p->fbo_reflection, r_fb.water.depthtexture, p->texture_reflection); R_ClearScreen(r_refdef.fogenabled); if(r_water_scissormode.integer & 2) -- 2.39.2