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 - Visibility improvements #10665

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
6 changes: 3 additions & 3 deletions addons/nametags/functions/fnc_onDraw3d.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if !((_camPosAGL select 0) isEqualType 0) exitWith {}; // handle RHS / bugged ve
private _camPosASL = AGLToASL _camPosAGL;

// Show nametag for the unit behind the cursor or its commander
if (_enabledTagsCursor) then {
if (_enabledTagsCursor || GVAR(showCursorTagForVehicles)) then {
private _target = cursorTarget;
if !(_target isKindOf "CAManBase") then {
// When cursorTarget is on a vehicle show the nametag for the commander.
Expand All @@ -55,7 +55,7 @@ if (_enabledTagsCursor) then {
if (_target != ACE_player &&
{(side group _target) == (side group ACE_player)} &&
{GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
{lineIntersectsSurfaces [_camPosASL, eyePos _target, ACE_player, _target] isEqualTo []} &&
{lineIntersectsSurfaces [_camPosASL, eyePos _target, ACE_player, _target, true, 1, "GEOM", "NONE"] isEqualTo []} &&
{!isObjectHidden _target}) then {

private _distance = ACE_player distance _target;
Expand Down Expand Up @@ -83,7 +83,7 @@ if (_enabledTagsNearby) then {
_x != ACE_player &&
{(side group _x) == (side group ACE_player)} &&
{GVAR(showNamesForAI) || {[_x] call EFUNC(common,isPlayer)}} &&
{lineIntersectsSurfaces [_camPosASL, eyePos _x, ACE_player, _x] isEqualTo []} &&
{lineIntersectsSurfaces [_camPosASL, eyePos _x, ACE_player, _x, true, 1, "GEOM", "NONE"] isEqualTo []} &&
{!isObjectHidden _x}
};
private _crewMen = [];
Expand Down
Loading