From ff8f055977a76ac23ea29b456fa461bfab7343e2 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 24 May 2012 13:00:51 +0200 Subject: [PATCH] autocvar_cl_forcemyplayermodel now also really affects team mates --- qcsrc/client/csqcmodel_hooks.qc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 08e19dcaf..22ee5c38f 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -170,7 +170,18 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer) } // apply it - if(autocvar_cl_forcemyplayermodel != "" && forceplayermodels_myisgoodmodel && islocalplayer) + float isfriend; + if(teamplay) + { + cm = self.forceplayermodels_savecolormap; + cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(self.colormap - 1, "colors")) + 1024); + + isfriend = (cm == 1024 + 17 * myteam); + } + else + isfriend = islocalplayer; + + if(autocvar_cl_forcemyplayermodel != "" && forceplayermodels_myisgoodmodel && isfriend) { self.model = forceplayermodels_mymodel; self.modelindex = forceplayermodels_mymodelindex; -- 2.39.2