From 9c6010e7040b600691285a01a21e2df1d0c4be03 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 25 Jul 2012 12:41:22 +0200 Subject: [PATCH] fix "cm" variable --- qcsrc/client/csqcmodel_hooks.qc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 1e20dc8fd..9c87d13ad 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -174,13 +174,12 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer) // apply it float isfriend; - if(teamplay) - { - cm = self.forceplayermodels_savecolormap; - cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(self.colormap - 1, "colors")) + 1024); + float cm; + cm = self.forceplayermodels_savecolormap; + cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(self.colormap - 1, "colors")) + 1024); + if(teamplay) isfriend = (cm == 1024 + 17 * myteam); - } else isfriend = islocalplayer; @@ -248,10 +247,6 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer) forcecolor_friend = 0; } - float cm; - cm = self.forceplayermodels_savecolormap; - cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(self.colormap - 1, "colors")) + 1024); - if(cm == 1024 + 17 * myteam) { if(forcecolor_friend) -- 2.39.2