2018-10-18 16:14:26 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
/*
|
|
|
|
* Author: alganthe
|
2019-12-27 01:42:48 +00:00
|
|
|
* Draws AI garrison pathing while the Zeus display is open.
|
2018-10-18 16:14:26 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
2019-12-27 01:42:48 +00:00
|
|
|
* Return Value:
|
2018-10-18 16:14:26 +00:00
|
|
|
* None
|
|
|
|
*
|
2019-12-27 01:42:48 +00:00
|
|
|
* Example:
|
|
|
|
* [] call ace_ai_fnc_drawCuratorGarrisonPathing
|
|
|
|
*
|
2018-10-18 16:14:26 +00:00
|
|
|
* Public: No
|
2019-12-27 01:42:48 +00:00
|
|
|
*/
|
2018-10-18 16:14:26 +00:00
|
|
|
|
2019-12-27 01:42:48 +00:00
|
|
|
if (isNull findDisplay 312) exitWith {
|
|
|
|
removeMissionEventHandler ["Draw3D", _thisEventHandler];
|
|
|
|
};
|
2018-10-18 16:14:26 +00:00
|
|
|
|
2019-12-27 01:42:48 +00:00
|
|
|
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
2018-10-18 16:14:26 +00:00
|
|
|
|
2019-12-27 01:42:48 +00:00
|
|
|
{
|
|
|
|
_x params ["_unit", "_pos"];
|
|
|
|
|
|
|
|
switch (true) do {
|
|
|
|
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
|
|
|
for "_i" from 0 to 3 do {
|
|
|
|
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
2018-10-18 16:14:26 +00:00
|
|
|
};
|
2019-12-27 01:42:48 +00:00
|
|
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
|
|
|
};
|
2018-10-18 16:14:26 +00:00
|
|
|
|
2019-12-27 01:42:48 +00:00
|
|
|
case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
|
|
|
for "_i" from 0 to 3 do {
|
|
|
|
drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]];
|
2018-10-18 16:14:26 +00:00
|
|
|
};
|
2019-12-27 01:42:48 +00:00
|
|
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
|
|
|
};
|
2018-10-18 16:14:26 +00:00
|
|
|
|
2019-12-27 01:42:48 +00:00
|
|
|
case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
|
|
|
for "_i" from 0 to 3 do {
|
|
|
|
drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]];
|
2018-10-18 16:14:26 +00:00
|
|
|
};
|
2019-12-27 01:42:48 +00:00
|
|
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
|
|
|
};
|
2018-10-18 16:14:26 +00:00
|
|
|
|
2019-12-27 01:42:48 +00:00
|
|
|
case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
|
|
|
for "_i" from 0 to 3 do {
|
|
|
|
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]];
|
2018-10-18 16:14:26 +00:00
|
|
|
};
|
2019-12-27 01:42:48 +00:00
|
|
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
2018-10-18 16:14:26 +00:00
|
|
|
};
|
2019-12-27 01:42:48 +00:00
|
|
|
};
|
|
|
|
} forEach _unitMoveList;
|