Small Performace Improvement in Nametags

This commit is contained in:
Joko 2015-07-04 23:03:16 +02:00
parent 19c16b1f59
commit 815365fd2e
2 changed files with 1 additions and 13 deletions

View File

@ -35,7 +35,7 @@ if ((_iconType == ICON_NAME_SPEAK) || (_iconType == ICON_SPEAK)) then {
_alpha = _alpha max 0.6;//Boost alpha when speaking
} else {
if (_iconType == ICON_NAME_RANK) then {
_icon = TEXTURES_RANKS select ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target)) + 1);
_icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa",(toLower(rank _target))];
_size = 1;
};
};

View File

@ -16,15 +16,3 @@
#define ICON_NAME_RANK 2
#define ICON_NAME_SPEAK 3
#define ICON_SPEAK 4
//todo?: custom rank icons??
#define TEXTURES_RANKS [ \
"", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa", \
"\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \
]