From 7f81a6b047e89c7e606e61f0dc37b574a5f2402a Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 26 Jul 2020 10:04:33 +0200 Subject: [PATCH] cl_forceplayercolors 3 forces player colors to mine only in Duel --- qcsrc/client/csqcmodel_hooks.qc | 5 ++++- qcsrc/menu/xonotic/dialog_settings_game_model.qc | 1 + xonotic-client.cfg | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index f08378b6a8..048669bd22 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 b57d7cae8a..822e2c32dd 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 17224b2220..e39a892fb2 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)" -- 2.39.2