Skip to content

Commit

Permalink
Map Tools - Fix tools showing after item is dropped out of inventory (a…
Browse files Browse the repository at this point in the history
…cemod#9749)

Co-authored-by: johnb432 <[email protected]>
  • Loading branch information
PabstMirror and johnb432 authored Jan 22, 2024
1 parent 7bc3fab commit c150d92
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions addons/maptools/functions/fnc_updateMapToolMarkers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@ if (GVAR(plottingBoard_Shown) == 0) then {
_y set [4, 0];
};
} forEach GVAR(plottingBoard_markers);
};

if (((GVAR(mapTool_Shown) == 0) && {GVAR(plottingBoard_Shown) == 0}) || {
private _uniqueItems = ACE_player call EFUNC(common,uniqueItems);

!(("ACE_MapTools" in _uniqueItems) || {"ACE_PlottingBoard" in _uniqueItems})
}) exitWith {};

if (GVAR(plottingBoard_Shown) > 0) then {
} else {
if !([ACE_player, "ACE_PlottingBoard"] call EFUNC(common,hasItem)) exitWith {};
if (GVAR(plottingBoard_moveToMouse)) then {
GVAR(plottingBoard_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition;
GVAR(plottingBoard_moveToMouse) = false; // we only need to do this once after opening the map tool
Expand Down Expand Up @@ -97,7 +90,7 @@ if (GVAR(plottingBoard_Shown) > 0) then {
} forEach GVAR(plottingBoard_markers);
};

if (GVAR(mapTool_Shown) > 0) then {
if ((GVAR(mapTool_Shown) > 0) && {[ACE_player, "ACE_MapTools"] call EFUNC(common,hasItem)}) then {
// Open map tools in center of screen when toggled to be shown
if (GVAR(mapTool_moveToMouse)) then {
GVAR(mapTool_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition;
Expand Down

0 comments on commit c150d92

Please sign in to comment.