]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix "cm" variable
authorRudolf Polzer <divverent@xonotic.org>
Wed, 25 Jul 2012 10:41:22 +0000 (12:41 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 25 Jul 2012 10:41:22 +0000 (12:41 +0200)
qcsrc/client/csqcmodel_hooks.qc

index 1e20dc8fd2e89ffeaf5448c1aa9f1020eadfcbdc..9c87d13addf9949c671a4319da1e5c91f2f69b45 100644 (file)
@@ -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)