move the definition to outside of the function; i think it's cleaner like this
authorFruitieX <rasse@rasse-lappy.localdomain>
Fri, 16 Jul 2010 09:44:06 +0000 (12:44 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Fri, 16 Jul 2010 09:44:06 +0000 (12:44 +0300)
qcsrc/client/hud.qc

index a135cb5be560ee8f886e620eb24f340a28f8dc6f..00f687d8fd9edf487e2d9c77ac03bb63de4ec0b8 100644 (file)
@@ -1372,6 +1372,7 @@ float GetAmmoTypeForWep(float i)
        }
 }
 
+#define acc_color(i) stov(cvar_string(strcat("hud_weaponicons_accuracy_color", ftos(i))))
 #define MAX_ACCURACY_LEVELS 10
 float acc_lev[MAX_ACCURACY_LEVELS];
 
@@ -1500,8 +1501,6 @@ void HUD_WeaponIcons(void)
                        while ( j && weapon_stats < acc_lev[j] )
                                --j;
 
-#define acc_color(i) stov(cvar_string(strcat("hud_weaponicons_accuracy_color", ftos(i))))
-
                        // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
                        float factor;
                        factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);