From: FruitieX Date: Fri, 16 Jul 2010 09:44:06 +0000 (+0300) Subject: move the definition to outside of the function; i think it's cleaner like this X-Git-Tag: xonotic-v0.1.0preview~362^2~38 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c0815935bf80499d30ee2da7c728c71bc3169555;p=xonotic%2Fxonotic-data.pk3dir.git move the definition to outside of the function; i think it's cleaner like this --- 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]);