-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nametags - Fix ACE nametag drawIcon3D parameter error when player controlled unit dies #8764
Conversation
This function is horrenduous. While this probably fixes the issue, it only makes the thing even worse. I'd prefer if someone refactors this. |
No time here to rewrite it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks object namespace icons. As suspected, the logic is broken.
params ["_player", "_target", "_alpha", "_heightOffset", "_drawName", "_drawRank", "_drawSoundwave"];
private _targetIcon = _target getVariable QGVAR(rankIcon);
private _icon = switch true do {
case _drawSoundwave: {
format [QPATHTOF(UI\soundwave%1.paa), floor random 10]
};
case !_drawRank: {""};
case !isNil "_targetIcon": {_targetIcon};
case rank _target == "": {""};
default {
private _targetFaction = _target getVariable [QGVAR(faction), faction _target];
private _customRankIcons = GVAR(factionRanks) getVariable _targetFaction;
if (!isNil "_customRankIcons") then {
_customRankIcons param [ALL_RANKS find rank _target, ""] // return
} else {
// default rank icons
format ["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _target] // return
};
};
}; . |
Does this need testing? |
I tested after committing if I remember correctly |
Tested when getting closer to unit and when units get killed |
When merged this pull request will:
_icon
is nevernil
rank
return""
just before the ACE nametags disappearIMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.