From: Rudolf Polzer Date: Wed, 25 Jul 2012 10:41:22 +0000 (+0200) Subject: fix "cm" variable X-Git-Tag: xonotic-v0.7.0~305 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9c6010e7040b600691285a01a21e2df1d0c4be03;p=xonotic%2Fxonotic-data.pk3dir.git fix "cm" variable --- 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)