mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3445 from acemod/preventSelfIMFromClosing
Prevent Self Interact Menu from bugging out during animations
This commit is contained in:
commit
f758a90351
@ -77,19 +77,29 @@ if (GVAR(useCursorMenu)) then {
|
|||||||
|
|
||||||
GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLtoASL (positionCameraToWorld [0, 0, 0]));
|
GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLtoASL (positionCameraToWorld [0, 0, 0]));
|
||||||
|
|
||||||
if (GVAR(menuAnimationSpeed) > 0) then {
|
|
||||||
//Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice)
|
//Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice)
|
||||||
if (GVAR(openedMenuType) == 0) then {
|
if (GVAR(openedMenuType) == 0) then {
|
||||||
if (isNull curatorCamera) then {
|
if (isNull curatorCamera) then {
|
||||||
if (vehicle ACE_player != ACE_player) then {
|
if (vehicle ACE_player != ACE_player) then {
|
||||||
GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]];
|
GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]];
|
||||||
|
GVAR(expanded) = true;
|
||||||
|
GVAR(expandedTime) = ACE_diagTime;
|
||||||
|
GVAR(lastPath) = +GVAR(menuDepthPath);
|
||||||
|
GVAR(startHoverTime) = -1000;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]];
|
GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]];
|
||||||
|
GVAR(expanded) = true;
|
||||||
|
GVAR(expandedTime) = ACE_diagTime;
|
||||||
|
GVAR(lastPath) = +GVAR(menuDepthPath);
|
||||||
|
GVAR(startHoverTime) = -1000;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
GVAR(menuDepthPath) = [["ACE_SelfActions", ACE_player]];
|
GVAR(menuDepthPath) = [["ACE_SelfActions", ACE_player]];
|
||||||
};
|
GVAR(expanded) = true;
|
||||||
|
GVAR(expandedTime) = ACE_diagTime;
|
||||||
|
GVAR(lastPath) = +GVAR(menuDepthPath);
|
||||||
|
GVAR(startHoverTime) = -1000;
|
||||||
};
|
};
|
||||||
|
|
||||||
["interactMenuOpened", [_menuType]] call EFUNC(common,localEvent);
|
["interactMenuOpened", [_menuType]] call EFUNC(common,localEvent);
|
||||||
|
@ -116,8 +116,6 @@ if (GVAR(openedMenuType) >= 0) then {
|
|||||||
|
|
||||||
if(!_foundTarget && GVAR(actionSelected)) then {
|
if(!_foundTarget && GVAR(actionSelected)) then {
|
||||||
GVAR(actionSelected) = false;
|
GVAR(actionSelected) = false;
|
||||||
GVAR(expanded) = false;
|
|
||||||
GVAR(lastPath) = [];
|
|
||||||
};
|
};
|
||||||
for "_i" from GVAR(iconCount) to (count GVAR(iconCtrls))-1 do {
|
for "_i" from GVAR(iconCount) to (count GVAR(iconCtrls))-1 do {
|
||||||
ctrlDelete (GVAR(iconCtrls) select _i);
|
ctrlDelete (GVAR(iconCtrls) select _i);
|
||||||
|
Loading…
Reference in New Issue
Block a user