]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
kill a seriously weird array use
authorRudolf Polzer <divverent@alientrap.org>
Sat, 25 Feb 2012 08:30:36 +0000 (09:30 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 25 Feb 2012 08:30:36 +0000 (09:30 +0100)
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/scoreboard.qc

index a08117616dbd7624addade9917578fb3aa9f30ea..66d7dd31c4b1ae258043002bc381a81109d9ddfc 100644 (file)
@@ -1497,7 +1497,7 @@ void CSQC_common_hud(void)
                 acc_lev[i] = stof(argv(i)) / 100.0;
         }
         // let know that acc_col[] needs to be loaded
-        acc_col_x[0] = -1;
+        acc_col[0] = '-1 0 0';
     }
 
     HUD_Main(); // always run these functions for alpha checks
index 04f3020cb1e4ff325e63461a4e406940ab8d2465..d6331d558a2bfd72d742bad1f7d8957997543115 100644 (file)
@@ -662,7 +662,7 @@ void HUD_Weapons(void)
        if(autocvar_hud_panel_weapons_accuracy && acc_levels)
        {
                show_accuracy = true;
-               if (acc_col_x[0] == -1)
+               if (acc_col[0] == '-1 0 0')
                        for (i = 0; i < acc_levels; ++i)
                                acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
        }
index 05c8df88cfc68f767c1eb268bab64044dc9ef4fa..58273dc19da80b4788519dea9c7ce83cedcf5498 100644 (file)
@@ -985,7 +985,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 
        if (!acc_levels)
                rgb = '1 1 1';
-       else if (acc_col_x[0] == -1)
+       else if (acc_col[0] == '-1 0 0')
                for (i = 0; i < acc_levels; ++i)
                        acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));