loadsky command implemented:

loadsky skyname
		turns it on if env/skyname*.tga exists

	loadsky none
		turns it off, always.

Clientside support.  Serverside key needs to be added still
This commit is contained in:
Joseph Carter 2000-05-18 20:32:11 +00:00
parent 00aa3557d4
commit 0594dcfd33
6 changed files with 51 additions and 2 deletions

View File

@ -349,3 +349,6 @@ void R_EmitEdge (mvertex_t *pv0, mvertex_t *pv1);
void R_ClipEdge (mvertex_t *pv0, mvertex_t *pv1, clipplane_t *clip);
void R_SplitEntityOnNode2 (mnode_t *node);
void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
void R_LoadSkys (char *);

View File

@ -124,7 +124,6 @@ void R_RemoveEfrags (entity_t *ent);
void R_NewMap (void);
void R_ParseParticleEffect (void);
void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
void R_RocketTrail (vec3_t start, vec3_t end, int type);

View File

@ -195,6 +195,22 @@ void R_Envmap_f (void)
GL_EndRendering ();
}
/*
R_LoadSky_f
*/
void
R_LoadSky_f ()
{
if (Cmd_Argc () != 2)
{
Con_Printf ("loadsky <name> : load a skybox\n");
return;
}
R_LoadSkys (Cmd_Argv(1));
}
/*
===============
R_Init
@ -205,6 +221,7 @@ void R_Init (void)
Cmd_AddCommand ("timerefresh", R_TimeRefresh_f);
Cmd_AddCommand ("envmap", R_Envmap_f);
Cmd_AddCommand ("pointfile", R_ReadPointFile_f);
Cmd_AddCommand ("loadsky", R_LoadSky_f);
/* Cvar_RegisterVariable (&r_norefresh);
CVAR_FIXME */

View File

@ -239,6 +239,8 @@ void R_InitTextures (void)
}
}
void R_LoadSky_f ();
/*
===============
R_Init
@ -255,6 +257,7 @@ void R_Init (void)
Cmd_AddCommand ("timerefresh", R_TimeRefresh_f);
Cmd_AddCommand ("pointfile", R_ReadPointFile_f);
Cmd_AddCommand ("loadsky", R_LoadSky_f);
/* Cvar_RegisterVariable (&r_draworder);
CVAR_FIXME */

View File

@ -116,6 +116,23 @@ void R_TimeRefresh_f (void)
r_refdef.viewangles[1] = startangle;
}
/*
R_LoadSky_f
*/
void
R_LoadSky_f ()
{
if (Cmd_Argc () != 2)
{
Con_Printf ("loadsky <name> : load a skybox\n");
return;
}
R_LoadSkys (Cmd_Argv(1));
}
/*
================
R_LineGraph

View File

@ -288,3 +288,13 @@ void R_SetSkyFrame (void)
}
/*
R_LoadSkys
Stub function for loading a skybox. Currently we only have support for
skyboxes in GL targets, so we just do nothing here. --KB
*/
void
R_LoadSkys (char * name)
{
}