From ecd8aa810a2bafb957fd4e8be27ca5fd75d27791 Mon Sep 17 00:00:00 2001 From: commy2 Date: Thu, 23 Jun 2016 11:33:29 +0200 Subject: [PATCH 1/2] Improve function header 'CBA_fnc_waitUntilAndExecute' --- addons/common/fnc_waitUntilAndExecute.sqf | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/addons/common/fnc_waitUntilAndExecute.sqf b/addons/common/fnc_waitUntilAndExecute.sqf index f14772a74..7d14c04cb 100644 --- a/addons/common/fnc_waitUntilAndExecute.sqf +++ b/addons/common/fnc_waitUntilAndExecute.sqf @@ -5,9 +5,12 @@ Description: Executes a code once in non sched environment after a condition is true. Parameters: - _conditionFunction - The function to evaluate as condition. - _statementFunction - The function to run once the condition is true. - _args - Parameters passed to the function executing. This will be the same array every execution. [optional] + _condition - The function to evaluate as condition. + _statement - The function to run once the condition is true. + _args - Parameters passed to the function executing. This will be the same array every execution. (optional) + +Passed Arguments: + _this - Parameters passed by this function. Same as '_args' above. Returns: Nothing @@ -22,6 +25,8 @@ Author: ---------------------------------------------------------------------------- */ #include "script_component.hpp" -params [["_conditionFunction", {}, [{}]], ["_statementFunction", {}, [{}]], ["_args", []]]; +params [["_condition", {}, [{}]], ["_statement", {}, [{}]], ["_args", []]]; + +GVAR(waitUntilAndExecArray) pushBack [_condition, _statement, _args]; -GVAR(waitUntilAndExecArray) pushBack [_conditionFunction, _statementFunction, _args]; +nil From e2444b987b6e5e654ffa4d20094a2c991049d586 Mon Sep 17 00:00:00 2001 From: commy2 Date: Thu, 23 Jun 2016 11:42:27 +0200 Subject: [PATCH 2/2] Improve function header 'CBA_fnc_waitUntilAndExecute' --- addons/common/fnc_waitUntilAndExecute.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/common/fnc_waitUntilAndExecute.sqf b/addons/common/fnc_waitUntilAndExecute.sqf index 7d14c04cb..b0f572f6d 100644 --- a/addons/common/fnc_waitUntilAndExecute.sqf +++ b/addons/common/fnc_waitUntilAndExecute.sqf @@ -2,12 +2,12 @@ Function: CBA_fnc_waitUntilAndExecute Description: - Executes a code once in non sched environment after a condition is true. + Executes a code once in unscheduled environment after a condition is true. Parameters: _condition - The function to evaluate as condition. _statement - The function to run once the condition is true. - _args - Parameters passed to the function executing. This will be the same array every execution. (optional) + _args - Parameters passed to the functions (statement and condition) executing. (optional) Passed Arguments: _this - Parameters passed by this function. Same as '_args' above.