mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Menu - Check cursorObject if cursorTarget is invalid (#6496)
Should fix #6488
This commit is contained in:
parent
6ae7c28025
commit
240046ceee
@ -17,8 +17,12 @@ GVAR(pendingReopen) = false;
|
||||
|
||||
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey),
|
||||
{
|
||||
TRACE_3("keyDown",cursorTarget,cursorObject,ACE_player);
|
||||
private _target = cursorTarget;
|
||||
if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player};
|
||||
if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {
|
||||
_target = cursorObject;
|
||||
if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then { _target = ACE_player; };
|
||||
};
|
||||
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
Loading…
Reference in New Issue
Block a user