From 892671c770862e0837498678c820e2b33e5cf186 Mon Sep 17 00:00:00 2001 From: Grim <69561145+LinkIsGrim@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:03:36 -0300 Subject: [PATCH] Medical - Prevent running `FUNC(deserializeState)` in scheduled environment (#9662) Run deserializeState in unscheduled --- addons/medical/functions/fnc_deserializeState.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/medical/functions/fnc_deserializeState.sqf b/addons/medical/functions/fnc_deserializeState.sqf index b85e0b31e2..b7846bf901 100644 --- a/addons/medical/functions/fnc_deserializeState.sqf +++ b/addons/medical/functions/fnc_deserializeState.sqf @@ -17,6 +17,11 @@ */ params [["_unit", objNull, [objNull]], ["_json", "{}", [""]]]; +// Don't run in scheduled environment +if (canSuspend) exitWith { + [FUNC(deserializeState), _this] call CBA_fnc_directCall +}; + if (isNull _unit) exitWith {}; if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit) };