From 010445a3adce51ceffbb87c676654b0422b61a23 Mon Sep 17 00:00:00 2001 From: mharis001 <34453221+mharis001@users.noreply.github.com> Date: Fri, 17 Nov 2023 13:22:05 -0500 Subject: [PATCH] Common - Use CBA_fnc_execAfterNFrames (#747) --- addons/common/XEH_PREP.hpp | 1 - .../common/functions/fnc_execAfterNFrames.sqf | 30 ------------------- addons/main/script_mod.hpp | 2 +- .../functions/fnc_initDisplayCurator.sqf | 2 +- 4 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 addons/common/functions/fnc_execAfterNFrames.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 1754d7b7c..339b180ce 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -11,7 +11,6 @@ PREP(drawHint); PREP(dumpPerformanceCounters); PREP(earthquake); PREP(ejectPassengers); -PREP(execAfterNFrames); PREP(exportMissionSQF); PREP(exportText); PREP(fireArtillery); diff --git a/addons/common/functions/fnc_execAfterNFrames.sqf b/addons/common/functions/fnc_execAfterNFrames.sqf deleted file mode 100644 index 84ec61b8e..000000000 --- a/addons/common/functions/fnc_execAfterNFrames.sqf +++ /dev/null @@ -1,30 +0,0 @@ -#include "script_component.hpp" -/* - * Author: mharis001 - * Executes the given code after the specified number of frames. - * - * Arguments: - * 0: Function - * 1: Arguments (default: []) - * 2: Frames (default: 0) - * - * Return Value: - * None - * - * Example: - * [{hint "Done!"}, [], 5] call zen_common_fnc_execAfterNFrames - * - * Public: No - */ - -if (canSuspend) exitWith { - [FUNC(execAfterNFrames), _this] call CBA_fnc_directCall; -}; - -params [["_function", {}, [{}]], ["_args", []], ["_frames", 0, [0]]]; - -if (_frames > 0) exitWith { - [FUNC(execAfterNFrames), [_function, _args, _frames - 1]] call CBA_fnc_execNextFrame; -}; - -_args call _function; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index fce004b1a..14b080762 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -11,7 +11,7 @@ // MINIMAL required version for the Mod. Components can specify others.. #define REQUIRED_VERSION 2.14 -#define REQUIRED_CBA_VERSION {3,15,8} +#define REQUIRED_CBA_VERSION {3,16,0} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ZEN - COMPONENT_BEAUTIFIED) diff --git a/addons/markers_tree/functions/fnc_initDisplayCurator.sqf b/addons/markers_tree/functions/fnc_initDisplayCurator.sqf index d20a7717e..9a4d2f1fc 100644 --- a/addons/markers_tree/functions/fnc_initDisplayCurator.sqf +++ b/addons/markers_tree/functions/fnc_initDisplayCurator.sqf @@ -62,5 +62,5 @@ missionNamespace getVariable ["RscDisplayCurator_sections", [0, 0]] params ["_mo // to properly hide the empty side control when initially in markers mode if (_mode == 3) then { private _ctrlSideEmpty = _display displayCtrl IDC_RSCDISPLAYCURATOR_SIDEEMPTY; - [{_this ctrlShow false}, _ctrlSideEmpty, 3] call EFUNC(common,execAfterNFrames); + [{_this ctrlShow false}, _ctrlSideEmpty, 3] call CBA_fnc_execAfterNFrames; };