Skip to content

Commit c20e2a8

Browse files
authored
Interact Menu - Fix _actionParams not accessible in action condition (#11385)
* Fix no _actionParams in condition * Fix comment
1 parent 91a6758 commit c20e2a8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

addons/interact_menu/functions/fnc_collectActiveActionTree.sqf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private _player = ACE_player;
2828
if ((_origActionData select 10) isNotEqualTo {}) then {
2929
// It should, so make a copy and pass it to the modifierFunction
3030
_origActionData = +_origActionData;
31-
private _actionParams = _origActionData select 6; // Define _actionParams so its accessible within the statement/condition
31+
private _actionParams = _origActionData select 6; // Define _actionParams so its accessible within modifierFunction
3232
[_target, ACE_player, _actionParams, _origActionData] call (_origActionData select 10);
3333
};
3434

@@ -39,12 +39,12 @@ _origActionData params [
3939
"_statementCode",
4040
"_conditionCode",
4141
"_insertChildrenCode",
42-
"_customParams",
42+
"_actionParams", // Define _actionParams so its accessible within the condition/insertChildren
4343
"_position",
4444
"_distance"
4545
];
4646

47-
private _result = [_target, ACE_player, _customParams] call _conditionCode;
47+
private _result = [_target, ACE_player, _actionParams] call _conditionCode;
4848

4949
// Handle nil as false
5050
if (isNil "_result") then {
@@ -69,7 +69,7 @@ private _activeChildren = [];
6969

7070
// If there's a statement to dynamically insert children then execute it
7171
if (_insertChildrenCode isNotEqualTo {}) then {
72-
private _dynamicChildren = [_target, ACE_player, _customParams] call _insertChildrenCode;
72+
private _dynamicChildren = [_target, ACE_player, _actionParams] call _insertChildrenCode;
7373

7474
// Collect dynamic children class actions
7575
{

0 commit comments

Comments
 (0)