Prevent skyboxes from getting disabled on vid_reloads.

This commit is contained in:
Shpoike 2023-02-20 08:48:54 +00:00
parent e104d6cf58
commit 832ee6beef

View file

@ -74,7 +74,10 @@ void R_SetSky(const char *sky)
int i;
const char *shadername;
extern cvar_t r_skyboxname;
Q_strncpyz(cl.skyname, sky, sizeof(cl.skyname));
if (sky)
Q_strncpyz(cl.skyname, sky, sizeof(cl.skyname));
else
sky = cl.skyname;
if (qrenderer <= QR_NONE)
return; //not ready yet...
if (*r_skyboxname.string) //override it with the user's preference
@ -259,7 +262,7 @@ static void R_ForceSky_f(void)
}
void QDECL R_SkyBox_Changed (struct cvar_s *var, char *oldvalue)
{
R_SetSky(var->string);
R_SetSky(NULL);
// Shader_NeedReload(false);
}