ACE3/addons/map/functions/fnc_blueForceTrackingUpdate.sqf
Dedmen Miller e2ac18a05d [WIP] Fix script errors reporting wrong line numbers (#6407)
* advanced_ballistics

* advanced_fatigue

* advanced_throwing

* ai

* aircraft

* arsenal

* atragmx

* attach

* backpacks

* ballistics

* captives

* cargo

* chemlights

* common

* concertina_wire

* cookoff

* dagr

* disarming

* disposable

* dogtags

* dragging

* explosives

* fastroping

* fcs

* finger

* frag

* gestures

* gforces

* goggles

* grenades

* gunbag

* hearing

* hitreactions

* huntir

* interact_menu

* interaction

* inventory

* kestrel4500

* laser

* laserpointer

* logistics_uavbattery

* logistics_wirecutter

* magazinerepack

* map

* map_gestures

* maptools

* markers

* medical

* medical_ai

* medical_blood

* medical_menu

* microdagr

* minedetector

* missileguidance

* missionmodules

* mk6mortar

* modules

* movement

* nametags

* nightvision

* nlaw

* optics

* optionsmenu

* overheating

* overpressure

* parachute

* pylons

* quickmount

* rangecard

* rearm

* recoil

* refuel

* reload

* reloadlaunchers

* repair

* respawn

* safemode

* sandbag

* scopes

* slideshow

* spectator

* spottingscope

* switchunits

* tacticalladder

* tagging

* trenches

* tripod

* ui

* vector

* vehiclelock

* vehicles

* viewdistance

* weaponselect

* weather

* winddeflection

* yardage450

* zeus

* arsenal defines.hpp

* optionals

* DEBUG_MODE_FULL 1

* DEBUG_MODE_FULL 2

* Manual fixes

* Add SQF Validator check for #include after block comment

* explosives fnc_openTimerUI

* fix uniqueItems
2018-09-17 14:19:29 -05:00

80 lines
2.3 KiB
Plaintext

#include "script_component.hpp"
/*
* Author: ACE-Team
* Update the blue force tracking.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ACE_map_fnc_blueForceTrackingUpdate
*
* Public: No
*/
// BEGIN_COUNTER(blueForceTrackingUpdate);
// Delete last set of markers (always)
{
deleteMarkerLocal _x;
} forEach GVAR(BFT_markers);
GVAR(BFT_markers) = [];
if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
private _groupsToDrawMarkers = [];
private _playerSide = call EFUNC(common,playerSide);
_groupsToDrawMarkers = allGroups select {side _x == _playerSide};
if (GVAR(BFT_HideAiGroups)) then {
_groupsToDrawMarkers = _groupsToDrawMarkers select {
{
_x call EFUNC(common,isPlayer);
} count units _x > 0;
};
};
if (GVAR(BFT_ShowPlayerNames)) then {
private _playersToDrawMarkers = allPlayers select {side _x == _playerSide && {!(_x getVariable [QGVAR(hideBlueForceMarker), false])}};
{
private _markerType = [_x] call EFUNC(common,getMarkerType);
private _colour = format ["Color%1", side _x];
private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos _x) select 0, (getPos _x) select 1]];
_marker setMarkerTypeLocal _markerType;
_marker setMarkerColorLocal _colour;
_marker setMarkerTextLocal (name _x);
GVAR(BFT_markers) pushBack _marker;
} forEach _playersToDrawMarkers;
_groupsToDrawMarkers = _groupsToDrawMarkers select {
{
!(_x call EFUNC(common,isPlayer));
} count units _x > 0;
};
};
_groupsToDrawMarkers = _groupsToDrawMarkers select {!(_x getVariable [QGVAR(hideBlueForceMarker), false])};
{
private _markerType = [_x] call EFUNC(common,getMarkerType);
private _colour = format ["Color%1", side _x];
private _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;
};
// END_COUNTER(blueForceTrackingUpdate);