mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
Move r_skyname handling from R_NewMap to R_LoadSkys.
r_skyname now acts as the default sky to use when no sky name is specified by other means ("none" is still no sky). 'loadsky foo' will load the "foo*" sky textures, 'loadsky none' gives the default sky, and 'loadsky ""' causes uses r_skyname.
This commit is contained in:
parent
8e557e81b6
commit
c4f71c0cda
2 changed files with 3 additions and 7 deletions
|
@ -158,7 +158,6 @@ R_Init (void)
|
|||
VISIBLE void
|
||||
R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
||||
{
|
||||
cvar_t *r_skyname;
|
||||
int i;
|
||||
texture_t *tex;
|
||||
|
||||
|
@ -198,12 +197,6 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
|||
tex = r_notexture_mip;
|
||||
tex->texturechain = NULL;
|
||||
tex->texturechain_tail = &tex->texturechain;
|
||||
|
||||
r_skyname = Cvar_FindVar ("r_skyname");
|
||||
if (r_skyname != NULL)
|
||||
R_LoadSkys (r_skyname->string);
|
||||
else
|
||||
R_LoadSkys ("none");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -116,6 +116,9 @@ R_LoadSkys (const char *skyname)
|
|||
const char *name;
|
||||
int i; // j
|
||||
|
||||
if (!skyname || !*skyname)
|
||||
skyname = r_skyname->string;
|
||||
|
||||
if (strcasecmp (skyname, "none") == 0) {
|
||||
skyloaded = false;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue