1
0
Fork 0
forked from fte/fteqw

Fixed faulty logic regarding allow_luma. Added a rule to allow everything when you're spectating.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2793 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Molgrum 2007-11-23 14:15:27 +00:00
parent dbb78b3825
commit 51bb724964

View file

@ -1368,7 +1368,7 @@ void CL_CheckServerInfo(void)
cls.allow_skyboxes=false; cls.allow_skyboxes=false;
cls.allow_mirrors=false; cls.allow_mirrors=false;
cls.allow_shaders=false; cls.allow_shaders=false;
cls.allow_luma=true; cls.allow_luma=false;
cls.allow_bump=false; cls.allow_bump=false;
#ifdef FISH #ifdef FISH
cls.allow_fish=false; cls.allow_fish=false;
@ -1376,32 +1376,32 @@ void CL_CheckServerInfo(void)
cls.allow_fbskins = 1; cls.allow_fbskins = 1;
// cls.allow_fbskins = 0; // cls.allow_fbskins = 0;
// cls.allow_overbrightlight; // cls.allow_overbrightlight;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "rearview"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "rearview")))
cls.allow_rearview=true; cls.allow_rearview=true;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "watervis"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "watervis")))
cls.allow_watervis=true; cls.allow_watervis=true;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_skybox")) || atoi(Info_ValueForKey(cl.serverinfo, "allow_skyboxes"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_skybox")) || atoi(Info_ValueForKey(cl.serverinfo, "allow_skyboxes")))
cls.allow_skyboxes=true; cls.allow_skyboxes=true;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "mirrors"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "mirrors")))
cls.allow_mirrors=true; cls.allow_mirrors=true;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_shaders"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_shaders")))
cls.allow_shaders=true; cls.allow_shaders=true;
if (cls.demoplayback || !atoi(Info_ValueForKey(cl.serverinfo, "allow_luma"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_luma")))
cls.allow_luma=false; cls.allow_luma=true;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_lmgamma"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_lmgamma")))
cls.allow_lightmapgamma=true; cls.allow_lightmapgamma=true;
s = Info_ValueForKey(cl.serverinfo, "allow_bump"); s = Info_ValueForKey(cl.serverinfo, "allow_bump");
if (cls.demoplayback || atoi(s) || !*s) //admin doesn't care. if (cl.spectator || cls.demoplayback || atoi(s) || !*s) //admin doesn't care.
cls.allow_bump=true; cls.allow_bump=true;
#ifdef FISH #ifdef FISH
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_fish"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_fish")))
cls.allow_fish=true; cls.allow_fish=true;
#endif #endif
@ -1412,11 +1412,11 @@ void CL_CheckServerInfo(void)
cls.allow_fbskins = 0; cls.allow_fbskins = 0;
s = Info_ValueForKey(cl.serverinfo, "*cheats"); s = Info_ValueForKey(cl.serverinfo, "*cheats");
if (cls.demoplayback || !stricmp(s, "on")) if (cl.spectator || cls.demoplayback || !stricmp(s, "on"))
cls.allow_cheats = true; cls.allow_cheats = true;
s = Info_ValueForKey(cl.serverinfo, "strict"); s = Info_ValueForKey(cl.serverinfo, "strict");
if ((!cls.demoplayback && *s && strcmp(s, "0")) || !ruleset_allow_semicheats.value) if ((!cl.spectator && !cls.demoplayback && *s && strcmp(s, "0")) || !ruleset_allow_semicheats.value)
{ {
cls.allow_semicheats = false; cls.allow_semicheats = false;
cls.allow_cheats = false; cls.allow_cheats = false;
@ -1424,7 +1424,7 @@ void CL_CheckServerInfo(void)
cls.allow_shaders = cls.allow_cheats; cls.allow_shaders = cls.allow_cheats;
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_shaders"))) if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_shaders")))
cls.allow_shaders=true; cls.allow_shaders=true;
@ -1487,7 +1487,7 @@ void CL_CheckServerInfo(void)
cls.allow_anyparticles = false; cls.allow_anyparticles = false;
if (cls.demoplayback) if (cl.spectator || cls.demoplayback)
cl.fpd = 0; cl.fpd = 0;
else else
cl.fpd = atoi(Info_ValueForKey(cl.serverinfo, "fpd")); cl.fpd = atoi(Info_ValueForKey(cl.serverinfo, "fpd"));