]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
cl_forceplayercolors 3 forces player colors to mine only in Duel
authorterencehill <piuntn@gmail.com>
Sun, 26 Jul 2020 08:04:33 +0000 (10:04 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 26 Jul 2020 08:04:33 +0000 (10:04 +0200)
qcsrc/client/csqcmodel_hooks.qc
qcsrc/menu/xonotic/dialog_settings_game_model.qc
xonotic-client.cfg

index f08378b6a86b27546eed52fe92434375c9615b5b..048669bd22ffbd061d59588e97a46cb00934db37 100644 (file)
@@ -6,6 +6,8 @@
 #include "weapons/projectile.qh"
 #include <common/animdecide.qh>
 #include <common/ent_cs.qh>
+#include <common/gamemodes/_mod.qh>
+#include <common/mapinfo.qh>
 #include <common/physics/movetypes/movetypes.qh>
 #include <common/viewloc.qh>
 #include <common/effects/all.qh>
@@ -242,7 +244,8 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer)
 
                if(autocvar_cl_forcemyplayercolors)
                        forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors;
-               if(autocvar_cl_forceplayercolors == 2 && team_count == 2)
+               if((autocvar_cl_forceplayercolors == 2 && team_count == 2)
+                       || (autocvar_cl_forceplayercolors == 3 && IS_GAMETYPE(DUEL)))
                        forcecolor_enemy = 1024 + autocvar__cl_color;
 
                if(forcecolor_enemy && !forcecolor_friend)
index b57d7cae8a8f536a643b67d25c1c7275a61801b6..822e2c32dd85a6058b903c99a5b891da7129aa00 100644 (file)
@@ -55,6 +55,7 @@ void XonoticGameModelSettingsTab_fill(entity me)
                        e.addValue(e, _("Never"), "0");
                        e.addValue(e, _("In non teamplay modes only"), "1");
                        e.addValue(e, _("Always"), "2");
+                       e.addValue(e, _("Only in Duel"), "3");
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
index 17224b222022d0cd29a942fdb07e8c6c80e49d8f..e39a892fb28d4ef9d7ea5d6a46e8d49af56c40c0 100644 (file)
@@ -732,7 +732,7 @@ set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the
 set developer_csqcentities 0 "csqc entity spam"
 
 seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
-seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); set it to 2 to enable it even in teamplay (only when there is exactly one enemy team)"
+seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); 2: enable it even in teamplay (only when there is exactly one enemy team); 3: enable it only playing Duel"
 seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
 seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
 seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"