Skip to content

Commit c702a18

Browse files
Nametags - Fix overlapping draw order (#10680)
* Nametags - Add option to fix overlapping * Fix stringtable ID that inadvertently got changed * Update addons/nametags/initSettings.inc.sqf Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> * Remove setting and use forEachReversed --------- Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
1 parent 3fba24a commit c702a18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/nametags/functions/fnc_onDraw3d.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if (_enabledTagsCursor) then {
7878
if (_enabledTagsNearby) then {
7979
// Find valid targets and cache them
8080
private _targets = [[], {
81-
private _nearMen = _camPosAGL nearObjects ["CAManBase", _maxDistance + 7];
81+
private _nearMen = nearestObjects [_camPosAGL, ["CAManBase"], _maxDistance + 7];
8282
_nearMen = _nearMen select {
8383
_x != ACE_player &&
8484
{(side group _x) == (side group ACE_player)} &&
@@ -138,7 +138,7 @@ if (_enabledTagsNearby) then {
138138
[ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
139139
};
140140
};
141-
} forEach _targets;
141+
} forEachReversed _targets;
142142
};
143143

144144
END_COUNTER(GVAR(onDraw3d));

0 commit comments

Comments
 (0)