]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
cvar: sv_allow_fullbright
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 9 Nov 2010 21:04:23 +0000 (22:04 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 9 Nov 2010 21:04:23 +0000 (22:04 +0100)
defaultXonotic.cfg
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/common/constants.qh
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc

index 59c3be6e4a8e6d7832789d24ecd1911bdc2003fc..19d728abe3199de275004d1c0e5355f138592652 100644 (file)
@@ -2009,6 +2009,9 @@ r_polygonoffset_decals_factor 0
 mod_q3shader_default_polygonoffset -14
 mod_q3shader_default_polygonfactor 0
 
+// allow fullbright
+set sv_allow_fullbright 0 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
+
 // other config files
 exec balanceXonotic.cfg
 exec ctfscoring-ai.cfg
index 959d593a393e49170882a4863a9e6b7ac7134ce9..8e47e6fa5bd880bc815444ae80c154985793ca6a 100644 (file)
@@ -269,3 +269,5 @@ string weaponorder_byimpulse;
 string weaponorder_bypriority;
 
 float nex_charge_movingavg;
+
+float serverflags;
index 4846a9fef572aab667fafb724778051d7c69f78c..d358a59a536db28ea46dd630f8c4e7b941264fe4 100644 (file)
@@ -1093,6 +1093,8 @@ void Ent_Init()
        nex_scope = !ReadByte();
        campingrifle_scope = !ReadByte();
 
+       serverflags = ReadByte();
+
        if(!postinit)
                PostInit();
 }
index 3c1b699fbba541a9337bfe6db822ed142e8bef76..1c58d390450f2a57cb59d89e3f766d4894b44713 100644 (file)
@@ -566,7 +566,8 @@ void CSQC_UpdateView(float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(cvar("r_fakelight") == 2 || cvar("r_fullbright") == 1)
+       if(cvar("r_fakelight") >= 2 || cvar("r_fullbright") >= 1)
+       if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
        {
                // apply night vision effect
                vector rgb, tc_00, tc_01, tc_10, tc_11;
index 9eb7a1610e42862c7e1d8725b1af06c8f507fb58..4acf797b7dddfc7974315f23c4f5e506d2a7e500 100644 (file)
@@ -646,3 +646,5 @@ string HUD_PANELNAME_ENGINEINFO             = "engineinfo";
 string HUD_PANELNAME_INFOMESSAGES      = "infomessages";
 
 float HUD_MENU_ENABLE          = 0;
+
+#define SERVERFLAG_ALLOW_FULLBRIGHT 1
index 45394eb7925db2bf34fd5e10818131e5646af2dc..74797441c38a10965614bc19763352330d3bbd9b 100644 (file)
@@ -660,3 +660,5 @@ string deathmessage;
 .float nex_charge;
 
 float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
+
+float serverflags;
index b074164a5f5dbd90d0750b56e1e78a214cc37ecf..738c32eba804ad81a6efec24192feb5509daab57 100644 (file)
@@ -1187,6 +1187,10 @@ void readlevelcvars(void)
        if(cvar("g_rocket_flying"))
                MUTATOR_ADD(mutator_rocketflying);
 
+       serverflags = 0;
+       if(cvar("sv_allow_fullbright"))
+               serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
+
     g_bugrigs = cvar("g_bugrigs");
     g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement");
     g_bugrigs_planar_movement_car_jumping = cvar("g_bugrigs_planar_movement_car_jumping");