fixed skybox texture leak on level changes
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Mar 2005 14:48:06 +0000 (14:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Mar 2005 14:48:06 +0000 (14:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5122 d7cf8633-e32d-0410-b094-e92efae38249

r_sky.c

diff --git a/r_sky.c b/r_sky.c
index 135d2da..3647a57 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -441,7 +441,7 @@ void R_Sky(void)
 
 void R_ResetSkyBox(void)
 {
-       skyboxside[0] = skyboxside[1] = skyboxside[2] = skyboxside[3] = skyboxside[4] = skyboxside[5] = NULL;
+       R_UnloadSkyBox();
        skyname[0] = 0;
        R_LoadSkyBox();
 }
@@ -469,7 +469,7 @@ void R_Sky_Init(void)
        Cvar_RegisterVariable (&r_sky);
        Cvar_RegisterVariable (&r_skyscroll1);
        Cvar_RegisterVariable (&r_skyscroll2);
-       skyboxside[0] = skyboxside[1] = skyboxside[2] = skyboxside[3] = skyboxside[4] = skyboxside[5] = NULL;
+       memset(&skyboxside, 0, sizeof(skyboxside));
        skyname[0] = 0;
        R_RegisterModule("R_Sky", r_sky_start, r_sky_shutdown, r_sky_newmap);
 }