X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=r_light.c;h=ecab72ac9aec9eeb2471e5ded2279aad26b67f10;hb=b6061d256d9e282ec64dafea71074f27122a604e;hp=343ac7462b792f66d8c5c6750b060deb55fcbc13;hpb=1a476882427593a562b624379f137bf8821db951;p=xonotic%2Fdarkplaces.git diff --git a/r_light.c b/r_light.c index 343ac746..ecab72ac 100644 --- 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;