From 488c5ec8b4a2102404538945dd4e3bbb1447fce8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 12 Sep 2021 19:19:38 +0200 Subject: [PATCH] Fix #2639 "cl_forceplayercolors 2 makes both teams the same colour when spectating" and both players in duel too --- qcsrc/client/csqcmodel_hooks.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 2.39.2