From: lordhavoc Date: Thu, 24 Aug 2000 00:58:15 +0000 (+0000) Subject: SVC_FOG changed (uses a short instead of a float so QC can write it). X-Git-Tag: RELEASE_0_2_0_RC1~1009 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ad2f1c0b81a35b091e79d4bc0f697bc9bcb50a61;p=xonotic%2Fdarkplaces.git 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 --- 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);