Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set negative draw priority for Building Markers #733

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions addons/building_markers/functions/fnc_set.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ if (_set) then {
_marker setMarkerDir getDir _object;
_object setVariable [QGVAR(marker), _marker, true];

private _jipID = [QEGVAR(common,setMarkerDrawPriority), [_marker, -1], _marker] call CBA_fnc_globalEventJIP;
[_jipID, _object] call CBA_fnc_removeGlobalEventJIP;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not handle the marker being removed without the object being deleted.


// Delete marker when the object is deleted
private _eventID = _object addEventHandler ["Deleted", {
params ["_object"];
Expand Down
5 changes: 5 additions & 0 deletions addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@
_object setObjectScale _scale;
}] call CBA_fnc_addEventHandler;

[QGVAR(setMarkerDrawPriority), {
params ["_markerName", "_priority"];
_markerName setMarkerDrawPriority _priority;
}] call CBA_fnc_addEventHandler;

[QGVAR(setVehicleRadar), {
params ["_vehicle", "_mode"];
_vehicle setVehicleRadar _mode;
Expand Down