From 8da43d25c6887eac09ba9f47f92dea3d10bdfdce Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Thu, 16 Jul 2015 17:28:27 -0300 Subject: [PATCH] Cache the objects actions for nearby objects and set the GVAR(objectActionList) correctly. --- .../interact_menu/functions/fnc_renderActionPoints.sqf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 707c3a33494..ba813ef8161 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -49,7 +49,7 @@ _fnc_renderNearbyActions = { _action = _x; if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action]; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; }; } forEach GVAR(objectActionList); @@ -61,7 +61,7 @@ _fnc_renderNearbyActions = { // Try to render the menu if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action]; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; } forEach _classActions; @@ -78,7 +78,10 @@ _fnc_renderNearbyActions = { _fnc_renderLastFrameActions = { { - _x call FUNC(renderBaseMenu); + EXPLODE_3_PVT(_x,_target,_action,_objectActionList); + + GVAR(objectActionList) = _objectActionList; + [_target, _action] call FUNC(renderBaseMenu); } forEach GVAR(foundActions); };