From: havoc Date: Sun, 8 Apr 2018 23:59:22 +0000 (+0000) Subject: Fix a bug with height fog which was revealed by removing X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=008d8756aa494164956200272bda3ba7d1b8f2d7;p=xonotic%2Fdarkplaces.git 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 --- 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;