mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
QW skybox handling
Since we clip the world properly even with skyboxes active, and the 'skybox' serverinfo doesn't do anything in any other engine I know of, nuke the 'skybox' serverinfo entirely and use a nice short semi-standard name ("sky") for the serverinfo containing the map's preferred skybox (as potentially modified by the .ent file on the server).
This commit is contained in:
parent
8394b12528
commit
9f596df607
2 changed files with 7 additions and 9 deletions
|
@ -648,8 +648,9 @@ CL_FullServerinfo_f (void)
|
|||
if ((p = Info_ValueForKey (cl.serverinfo, "fbskins")) && *p) {
|
||||
cl.fbskins = atoi (p);
|
||||
}
|
||||
|
||||
// R_LoadSkys does the right thing with null pointers.
|
||||
R_LoadSkys (Info_ValueForKey (cl.serverinfo, "r_skyname"));
|
||||
R_LoadSkys (Info_ValueForKey (cl.serverinfo, "sky"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -183,15 +183,13 @@ static int
|
|||
parse_field (progs_t *pr, const char *key, const char *value)
|
||||
{
|
||||
/*
|
||||
If skyname is set, we want to allow skyboxes and set what the skybox
|
||||
name should be. "qlsky" is supported since at least one other map
|
||||
uses it already.
|
||||
If skyname is set, set what the map thinks the skybox name should
|
||||
be. "qlsky" is supported since at least one other map uses it.
|
||||
*/
|
||||
if (strcaseequal (key, "skyname") // QuakeForge
|
||||
|| strcaseequal (key, "sky") // Q2/DarkPlaces
|
||||
|| strcaseequal (key, "qlsky")) { // QuakeLives
|
||||
Info_SetValueForKey (svs.info, "skybox", "1", 0);
|
||||
Info_SetValueForKey (svs.info, "r_skyname", value, 0);
|
||||
Info_SetValueForKey (svs.info, "sky", value, 0);
|
||||
return 1;
|
||||
}
|
||||
if (*key == '_') // ignore _fields
|
||||
|
@ -509,10 +507,9 @@ SV_LoadProgs (void)
|
|||
|
||||
memset (&sv_globals, 0, sizeof (sv_funcs));
|
||||
memset (&sv_funcs, 0, sizeof (sv_funcs));
|
||||
Info_RemoveKey (svs.info, "skybox");
|
||||
Info_RemoveKey (svs.info, "r_skyname");
|
||||
Info_RemoveKey (svs.info, "sky");
|
||||
if (*r_skyname->string)
|
||||
Info_SetValueForKey (svs.info, "r_skyname", r_skyname->string, 0);
|
||||
Info_SetValueForKey (svs.info, "sky", r_skyname->string, 0);
|
||||
|
||||
sv_cbuf->unknown_command = 0;
|
||||
ucmd_unknown = 0;
|
||||
|
|
Loading…
Reference in a new issue