Skip to content
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 overlapping draw order #10680

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/nametags/functions/fnc_onDraw3d.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if (_enabledTagsCursor) then {
if (_enabledTagsNearby) then {
// Find valid targets and cache them
private _targets = [[], {
private _nearMen = _camPosAGL nearObjects ["CAManBase", _maxDistance + 7];
private _nearMen = nearestObjects [_camPosAGL, ["CAManBase"], _maxDistance + 7];
_nearMen = _nearMen select {
_x != ACE_player &&
{(side group _x) == (side group ACE_player)} &&
Expand Down Expand Up @@ -138,7 +138,7 @@ if (_enabledTagsNearby) then {
[ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
};
};
} forEach _targets;
} forEachReversed _targets;
};

END_COUNTER(GVAR(onDraw3d));
Loading