From c0815935bf80499d30ee2da7c728c71bc3169555 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Fri, 16 Jul 2010 12:44:06 +0300 Subject: [PATCH] move the definition to outside of the function; i think it's cleaner like this --- qcsrc/client/hud.qc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index a135cb5be..00f687d8f 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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]); -- 2.39.2