From: terencehill Date: Sun, 12 Sep 2021 17:19:38 +0000 (+0200) Subject: Fix #2639 "cl_forceplayercolors 2 makes both teams the same colour when spectating... X-Git-Tag: xonotic-v0.8.5~349 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=488c5ec8b4a2102404538945dd4e3bbb1447fce8;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2639 "cl_forceplayercolors 2 makes both teams the same colour when spectating" and both players in duel too --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 0f5c919f9..1d4fec3f1 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -244,7 +244,7 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) if(autocvar_cl_forcemyplayercolors) forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors; - if(autocvar_cl_forceplayercolors != 3 && autocvar_cl_forceplayercolors == 2 && team_count == 2) + if(autocvar_cl_forceplayercolors == 2 && team_count == 2 && myteam != NUM_SPECTATOR) forcecolor_enemy = 1024 + autocvar__cl_color; if(forcecolor_enemy && !forcecolor_friend) @@ -296,7 +296,10 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) this.colormap = 1024 + (c1 << 4) + c2; } else if(autocvar_cl_forceplayercolors && (autocvar_cl_forceplayercolors != 3 || ISGAMETYPE(DUEL))) - this.colormap = player_localnum + 1; + { + if (!ISGAMETYPE(DUEL) || myteam != NUM_SPECTATOR) + this.colormap = player_localnum + 1; + } } LABEL(skipforcecolors)