ACE3/addons/dagr/functions/fnc_toggleOverlay.sqf

41 lines
907 B
Plaintext
Raw Normal View History

2015-06-07 15:53:37 +00:00
/*
* Author: Rosuto, Ruthberg
* Toggles the DAGR overlay
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
*
* Public: No
*/
#include "script_component.hpp"
if (cameraView == "GUNNER") exitWith {};
GVAR(run) = !GVAR(run);
2015-06-07 15:53:37 +00:00
if (GVAR(run)) then {
switch (toUpper GVAR(displaySelection)) do {
2015-06-07 15:53:37 +00:00
case "WP" : {
call FUNC(outputWP);
2015-06-07 15:53:37 +00:00
};
case "VECTOR" : {
call FUNC(outputVector);
2015-06-07 15:53:37 +00:00
};
case "DATA" : {
call FUNC(outputData);
2015-06-07 15:53:37 +00:00
};
};
[{
EXPLODE_1_PVT(_this select 0,_vehicle);
if (!GVAR(run) || (!alive ACE_player) || (cameraView == "GUNNER") || (vehicle ACE_player != _vehicle)) exitWith {
2015-06-07 15:53:37 +00:00
135471 cutText ["", "PLAIN"];
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
}, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler;
};