]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_light.c
An attempt to fix the particle color bug (it coudlnt read hex values).
[xonotic/darkplaces.git] / r_light.c
index 343ac7462b792f66d8c5c6750b060deb55fcbc13..ecab72ac9aec9eeb2471e5ded2279aad26b67f10 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -41,7 +41,7 @@ void r_light_start(void)
                for (x = 0;x < 32;x++)
                {
                        dx = (x - 15.5f) * (1.0f / 16.0f);
-                       a = ((1.0f / (dx * dx + dy * dy + 0.2f)) - (1.0f / (1.0f + 0.2))) * 32.0f / (1.0f / (1.0f + 0.2));
+                       a = (int)(((1.0f / (dx * dx + dy * dy + 0.2f)) - (1.0f / (1.0f + 0.2))) * 32.0f / (1.0f / (1.0f + 0.2)));
                        a = bound(0, a, 255);
                        pixels[y][x][0] = a;
                        pixels[y][x][1] = a;