Fix a bug with height fog which was revealed by removing
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 8 Apr 2018 23:59:22 +0000 (23:59 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 8 Apr 2018 23:59:22 +0000 (23:59 +0000)
RSurf_ActiveWorldEntity.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12373 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index cd41cac..4fa5d8b 100644 (file)
@@ -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;