]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_sky.c
get rid of yet another entity_frame_t on the stack, this is the last one, hopefully...
[xonotic/darkplaces.git] / r_sky.c
diff --git a/r_sky.c b/r_sky.c
index d47aea60d2c07cedde6ac9068198afe35caeb152..631da10e2e1307e4c4cc4928e2b2d4f4aca1f568 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -2,6 +2,7 @@
 #include "quakedef.h"
 #include "image.h"
 
+// FIXME: fix skybox after vid_restart
 cvar_t r_sky = {CVAR_SAVE, "r_sky", "1"};
 qboolean skyavailable_quake;
 qboolean skyavailable_box;
@@ -346,7 +347,7 @@ void R_InitSky (qbyte *src, int bytesperpixel)
        {
                for (i = 0;i < 128;i++)
                        for (j = 0;j < 128;j++)
-                               trans[(i*128) + j] = src[i*256+j+128];
+                               trans[(i*128) + j] = ((unsigned *)src)[i*256+j+128];
        }
        else
        {
@@ -380,7 +381,7 @@ void R_InitSky (qbyte *src, int bytesperpixel)
        {
                for (i = 0;i < 128;i++)
                        for (j = 0;j < 128;j++)
-                               trans[(i*128) + j] = src[i*256+j];
+                               trans[(i*128) + j] = ((unsigned *)src)[i*256+j];
        }
        else
        {