From b1e1abc83d9a02d6ad430f841732dc9272e2f30f Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 8 Apr 2018 23:59:22 +0000 Subject: [PATCH] Fix a bug with height fog which was revealed by removing RSurf_ActiveWorldEntity. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12373 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=008d8756aa494164956200272bda3ba7d1b8f2d7 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index cd41cacd..4fa5d8b3 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -8801,7 +8801,7 @@ void RSurf_ActiveModelEntity(const entity_render_t *ent, qboolean wantnormals, q R_EntityMatrix(&rsurface.matrix); Matrix4x4_Transform(&rsurface.inversematrix, r_refdef.view.origin, rsurface.localvieworigin); Matrix4x4_TransformStandardPlane(&rsurface.inversematrix, r_refdef.fogplane[0], r_refdef.fogplane[1], r_refdef.fogplane[2], r_refdef.fogplane[3], rsurface.fogplane); - rsurface.fogplaneviewdist *= rsurface.inversematrixscale; + rsurface.fogplaneviewdist = r_refdef.fogplaneviewdist * rsurface.inversematrixscale; rsurface.fograngerecip = r_refdef.fograngerecip * rsurface.matrixscale; rsurface.fogheightfade = r_refdef.fogheightfade * rsurface.matrixscale; rsurface.fogmasktabledistmultiplier = FOGMASKTABLEWIDTH * rsurface.fograngerecip; -- 2.39.2