mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Pass function by reference to Draw3D EH (#7333)
This commit is contained in:
parent
53c53bbdbc
commit
085ebd89db
@ -19,6 +19,6 @@ class Extended_PostInit_EventHandlers {
|
||||
|
||||
class Extended_DisplayLoad_EventHandlers {
|
||||
class RscDisplayCurator {
|
||||
ADDON = QUOTE(call FUNC(drawCuratorGarrisonPathing));
|
||||
ADDON = QUOTE(call FUNC(initDisplayCurator));
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
PREP(drawCuratorGarrisonPathing);
|
||||
PREP(garrison);
|
||||
PREP(unGarrison);
|
||||
PREP(garrisonMove);
|
||||
PREP(initDisplayCurator);
|
||||
PREP(unGarrison);
|
||||
|
@ -1,24 +1,27 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Add draw3D eh to the curator interface.
|
||||
* Draws AI garrison pathing while the Zeus display is open.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_ai_fnc_drawCuratorGarrisonPathing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
*/
|
||||
|
||||
addMissionEventHandler ["Draw3D", {
|
||||
if (findDisplay 312 isEqualTo displayNull) exitWith {
|
||||
if (isNull findDisplay 312) exitWith {
|
||||
removeMissionEventHandler ["Draw3D", _thisEventHandler];
|
||||
};
|
||||
};
|
||||
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
{
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
|
||||
switch (true) do {
|
||||
@ -50,5 +53,4 @@ addMissionEventHandler ["Draw3D", {
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||
};
|
||||
};
|
||||
} forEach _unitMoveList;
|
||||
}];
|
||||
} forEach _unitMoveList;
|
||||
|
18
addons/ai/functions/fnc_initDisplayCurator.sqf
Normal file
18
addons/ai/functions/fnc_initDisplayCurator.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: mharis001
|
||||
* Initializes the Zeus display.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_ai_fnc_initDisplayCurator
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
addMissionEventHandler ["Draw3D", {call FUNC(drawCuratorGarrisonPathing)}];
|
Loading…
Reference in New Issue
Block a user