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 <freghcz@gmail.com>
This commit is contained in:
freghar 2016-08-17 02:28:21 +02:00 committed by PabstMirror
parent b445a8460e
commit 9fa247398f

View File

@ -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];