From: terencehill Date: Sun, 26 Jul 2020 08:04:33 +0000 (+0200) Subject: cl_forceplayercolors 3 forces player colors to mine only in Duel X-Git-Tag: xonotic-v0.8.5~790^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f81a6b047e89c7e606e61f0dc37b574a5f2402a;p=xonotic%2Fxonotic-data.pk3dir.git cl_forceplayercolors 3 forces player colors to mine only in Duel --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index f08378b6a..048669bd2 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -6,6 +6,8 @@ #include "weapons/projectile.qh" #include #include +#include +#include #include #include #include @@ -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) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.qc b/qcsrc/menu/xonotic/dialog_settings_game_model.qc index b57d7cae8..822e2c32d 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_model.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.qc @@ -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:"))); diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 17224b222..e39a892fb 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -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)"