From 53e9c36f2759352df63c53fbb34b2b1eeb054072 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 24 Feb 2024 03:12:42 +0500 Subject: [PATCH] Set hardcoded fog density to render fog under the latest GoldSrc version. --- cl_dll/tri.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cl_dll/tri.cpp b/cl_dll/tri.cpp index 51fcb60b..8d2d67bb 100644 --- a/cl_dll/tri.cpp +++ b/cl_dll/tri.cpp @@ -188,6 +188,10 @@ void BlackFog ( void ) //Not in water and we want fog. static float fColorBlack[3] = {0,0,0}; bool bFog = g_iWaterLevel < 2 && g_fStartDist > 0 && g_fEndDist > 0; + + if( g_fEndDist > 0 ) + gEngfuncs.pTriAPI->FogParams( 0.0005f, true ); + if (bFog) gEngfuncs.pTriAPI->Fog ( fColorBlack, g_fStartDist, g_fEndDist, bFog ); else