From: cloudwalk Date: Sat, 16 May 2020 19:37:37 +0000 (+0000) Subject: Clear the skybox textures on map load. Use memset to clear skyname. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=745f52947afd0a413187753cae8459fbc8f9d81d;p=xonotic%2Fdarkplaces.git Clear the skybox textures on map load. Use memset to clear skyname. This fixes an issue where the skybox textures of the first map you load stick around in subsequent maps. There was a missing call to R_SkinFrame_PurgeSkinFrame. Also use memset to clear skyname for good measure. This may not have actually been part of the bug but it's harmless and it wasn't clearing the entire array previously. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12527 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_sky.c b/r_sky.c index 2a12b8f0..84b916e5 100644 --- a/r_sky.c +++ b/r_sky.c @@ -86,7 +86,7 @@ static void R_UnloadSkyBox(void) { if (skyboxskinframe[i]) { - // TODO: make a R_SkinFrame_Purge for single skins... + R_SkinFrame_PurgeSkinFrame(skyboxskinframe[i]); c++; } skyboxskinframe[i] = NULL; @@ -440,7 +440,7 @@ void R_Sky(void) void R_ResetSkyBox(void) { R_UnloadSkyBox(); - skyname[0] = 0; + memset(skyname,0,MAX_QPATH); R_LoadSkyBox(); }