From 51bb7249643b14848eef874921e1954bc3e22274 Mon Sep 17 00:00:00 2001 From: Molgrum Date: Fri, 23 Nov 2007 14:15:27 +0000 Subject: [PATCH] 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 --- engine/client/cl_main.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index a87a8da2a..a0b1a3fe5 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1368,7 +1368,7 @@ void CL_CheckServerInfo(void) cls.allow_skyboxes=false; cls.allow_mirrors=false; cls.allow_shaders=false; - cls.allow_luma=true; + cls.allow_luma=false; cls.allow_bump=false; #ifdef FISH cls.allow_fish=false; @@ -1376,32 +1376,32 @@ void CL_CheckServerInfo(void) cls.allow_fbskins = 1; // cls.allow_fbskins = 0; // 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; - if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "watervis"))) + if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "watervis"))) 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; - if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "mirrors"))) + if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "mirrors"))) 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; - if (cls.demoplayback || !atoi(Info_ValueForKey(cl.serverinfo, "allow_luma"))) - cls.allow_luma=false; + if (cl.spectator || cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "allow_luma"))) + 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; 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; #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; #endif @@ -1412,11 +1412,11 @@ void CL_CheckServerInfo(void) cls.allow_fbskins = 0; s = Info_ValueForKey(cl.serverinfo, "*cheats"); - if (cls.demoplayback || !stricmp(s, "on")) + if (cl.spectator || cls.demoplayback || !stricmp(s, "on")) cls.allow_cheats = true; 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_cheats = false; @@ -1424,7 +1424,7 @@ void CL_CheckServerInfo(void) 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; @@ -1487,7 +1487,7 @@ void CL_CheckServerInfo(void) cls.allow_anyparticles = false; - if (cls.demoplayback) + if (cl.spectator || cls.demoplayback) cl.fpd = 0; else cl.fpd = atoi(Info_ValueForKey(cl.serverinfo, "fpd"));