From ad2f1c0b81a35b091e79d4bc0f697bc9bcb50a61 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Thu, 24 Aug 2000 00:58:15 +0000 Subject: [PATCH] SVC_FOG changed (uses a short instead of a float so QC can write it). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index 38a5751e..56ddc152 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -81,7 +81,7 @@ char *svc_strings[] = "?", // 48 "?", // 49 "svc_skyboxsize", // [coord] size - "svc_fog" // [byte] enable [float] density [byte] red [byte] green [byte] blue + "svc_fog" // [byte] enable [short * 4096] density [byte] red [byte] green [byte] blue }; //============================================================================= @@ -1107,7 +1107,7 @@ void CL_ParseServerMessage (void) case svc_fog: if (MSG_ReadByte()) { - r_fogdensity.value = MSG_ReadFloat(); + r_fogdensity.value = MSG_ReadShort() * (1.0f / 4096.0f); r_fogred.value = MSG_ReadByte() * (1.0 / 255.0); r_foggreen.value = MSG_ReadByte() * (1.0 / 255.0); r_fogblue.value = MSG_ReadByte() * (1.0 / 255.0); -- 2.39.2