From: Mario Date: Mon, 3 Aug 2020 07:55:59 +0000 (+0000) Subject: Merge branch 'terencehill/cl_forceplayercolors_3' into 'master' X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=c05104bde1e758c4022f9755f02f177aa0476134;hp=37e404b90ba91c995eea11bc8227e0d5aef510c1 Merge branch 'terencehill/cl_forceplayercolors_3' into 'master' cl_forceplayercolors 3 forces player colors to mine only in Duel See merge request xonotic/xonotic-data.pk3dir!848 --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 10287ce6e..82b045801 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -8,6 +8,8 @@ #include "weapons/projectile.qh" #include #include +#include +#include #include #include #include @@ -245,7 +247,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)"