]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
use checkdisk flag on model loading after ingame download, this should
[xonotic/darkplaces.git] / vid_shared.c
index a50bf7254641f130f650fc61cba7ed846a2b5a10..87a188effacfc94ef29ed2ab7ea7884c7accba68 100644 (file)
@@ -1416,7 +1416,7 @@ void VID_BuildGammaTables(unsigned short *ramps, int rampsize)
        {
                int i;
                for(i = 0; i < 3*rampsize; ++i)
-                       ramps[i] = bound(0, (int)floor(Image_sRGBFloatFromLinear(ramps[i] / 256.0) * 65535.0 + 0.5), 65535);
+                       ramps[i] = (int)floor(bound(0.0f, Image_sRGBFloatFromLinearFloat(ramps[i] / 65535.0), 1.0f) * 65535.0 + 0.5);
        }
 
        // LordHavoc: this code came from Ben Winslow and Zinx Verituse, I have