]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
SVC_FOG changed (uses a short instead of a float so QC can write it).
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Aug 2000 00:58:15 +0000 (00:58 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Aug 2000 00:58:15 +0000 (00:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c

index 38a5751e58b7d18b269e175b0dbca405c659704f..56ddc152625f7b69978e901feae921e78d180b5a 100644 (file)
@@ -81,7 +81,7 @@ char *svc_strings[] =
        "?", // 48
        "?", // 49
        "svc_skyboxsize", // [coord] size
-       "svc_fog" // [byte] enable <optional past this point, only included if enable is true> [float] density [byte] red [byte] green [byte] blue
+       "svc_fog" // [byte] enable <optional past this point, only included if enable is true> [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);