From 9fa247398fc18d0050fb350fe2b1e1a942406c19 Mon Sep 17 00:00:00 2001 From: freghar Date: Wed, 17 Aug 2016 02:28:21 +0200 Subject: [PATCH] add BlueForceTracking filtering via an object variable (#4196) There's no good workaround for this: * creating a dummy unit on [0,0,0] and making it leader prevents grp members from entering vehicles * joining group of a different side prevents grp members from seeing blueforce tracking markers of their original side Usage (_obj can be group or unit, depending on BFT_ShowPlayerNames): _obj setVariable ["ACE_map_hideBlueForceMarker", true]; The inverse, hiding of markers of other groups/units for a particular player, can be already done by 'ace_map_BFT_Enabled = false' locally, as the Update function checks for it every time. Signed-off-by: freghar --- addons/map/functions/fnc_blueForceTrackingUpdate.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index cecf228924..163da08e06 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -27,7 +27,7 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then { }; if (GVAR(BFT_ShowPlayerNames)) then { - _playersToDrawMarkers = allPlayers select {side _x == _playerSide}; + _playersToDrawMarkers = allPlayers select {side _x == _playerSide && {!(_x getVariable [QGVAR(hideBlueForceMarker), false])}}; { private _markerType = [_x] call EFUNC(common,getMarkerType); @@ -48,6 +48,8 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then { }; }; + _groupsToDrawMarkers = _groupsToDrawMarkers select {!(_x getVariable [QGVAR(hideBlueForceMarker), false])}; + { private _markerType = [_x] call EFUNC(common,getMarkerType); private _colour = format ["Color%1", side _x];