From 0fe54b895a8dc0bdc4f1d786759c15b0ceba457d Mon Sep 17 00:00:00 2001 From: mharis001 <34453221+mharis001@users.noreply.github.com> Date: Thu, 14 Oct 2021 02:10:20 -0400 Subject: [PATCH] Medical - Clean up namespaces used by (de-)serializing functions (#8514) --- addons/medical/functions/fnc_deserializeState.sqf | 2 ++ addons/medical/functions/fnc_serializeState.sqf | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_deserializeState.sqf b/addons/medical/functions/fnc_deserializeState.sqf index 0fbd7960732..938c18e8fa2 100644 --- a/addons/medical/functions/fnc_deserializeState.sqf +++ b/addons/medical/functions/fnc_deserializeState.sqf @@ -96,3 +96,5 @@ private _targetState = _state getVariable [QGVAR(statemachineState), "Default"]; if (_currentState in ["Unconscious", "CardiacArrest"] && {_targetState in ["Default", "Injured"]}) then { [_unit, false] call EFUNC(medical_status,setUnconsciousState); }; + +_state call CBA_fnc_deleteNamespace; diff --git a/addons/medical/functions/fnc_serializeState.sqf b/addons/medical/functions/fnc_serializeState.sqf index 0e1a868a375..f48a714f9ea 100644 --- a/addons/medical/functions/fnc_serializeState.sqf +++ b/addons/medical/functions/fnc_serializeState.sqf @@ -61,4 +61,6 @@ private _currentState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_g _state setVariable [QGVAR(statemachineState), _currentState]; // Serialize & return -[_state] call CBA_fnc_encodeJSON +private _json = [_state] call CBA_fnc_encodeJSON; +_state call CBA_fnc_deleteNamespace; +_json