From 8d2b61257036e7a0631b88922f406955326a15b9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 28 Nov 2015 21:35:25 -0600 Subject: [PATCH] Remove nametags and actions on hidden units Fix #2596 --- addons/interact_menu/functions/fnc_renderActionPoints.sqf | 2 +- addons/nametags/functions/fnc_drawNameTagIcon.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 81a6887f97..c5b2c887ce 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -34,7 +34,7 @@ _fnc_renderNearbyActions = { // Quick oclussion test. Skip objects more than 1 m behind the camera plane _lambda = ((getPosASL _x) vectorDiff _cameraPos) vectorDotProduct _cameraDir; - if (_lambda > -1) then { + if ((_lambda > -1) && {!isObjectHidden _target}) then { _numInteractions = 0; // Prevent interacting with yourself or your own vehicle if (_target != ACE_player && {_target != vehicle ACE_player}) then { diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index 2947547431..8294a8db06 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -22,7 +22,7 @@ params ["_player", "_target", "_alpha", "_heightOffset", "_iconType"]; -if (_iconType == ICON_NONE) exitWith {}; //Don't waste time if not visable +if ((_iconType == ICON_NONE) || {isObjectHidden _target}) exitWith {}; //Don't waste time if not visable private ["_position", "_color", "_name", "_size", "_icon", "_scale"];