ACE3/addons/map/functions/fnc_blueForceTrackingUpdate.sqf
Nicolás Badano 518010be36 Reordered the map, mapfx and pbos:
- mapfx moved inside map
- everything related to map tools and drawing moved to it's own pbo called ace_maptools

Also fixed a couple of bugs in BFT
- Only a single marker was being drawn
- The BFT_HideAi parameter had the opposite effect
2015-03-14 16:58:05 -03:00

39 lines
1.2 KiB
Plaintext

#include "script_component.hpp"
// Delete last set of markers (always)
{
deleteMarkerLocal _x;
} forEach GVAR(BFT_markers);
if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
_groupsToDrawMarkers = [];
_playerSide = call EFUNC(common,playerSide);
if !(GVAR(BFT_HideAiGroups)) then {
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
} else {
_groupsToDrawMarkers = [allGroups, {
_anyPlayers = {
[_x] call EFUNC(common,isPlayer);
} count units _this;
(side _this == _playerSide) && _anyPlayers > 0
}] call EFUNC(common,filter);
};
{
_markerType = [_x] call EFUNC(common,getMarkerType);
_colour = format ["Color%1", side _x];
_marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
_marker setMarkerTypeLocal _markerType;
_marker setMarkerColorLocal _colour;
_marker setMarkerTextLocal (groupID _x);
GVAR(BFT_markers) pushBack _marker;
} forEach _groupsToDrawMarkers;
};