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 a081176..66d7dd3 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 04f3020..d6331d5 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 05c8df8..58273dc 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))));