Medical - Clean up namespaces used by (de-)serializing functions (#8514)

This commit is contained in:
mharis001 2021-10-14 02:10:20 -04:00 committed by GitHub
parent 0c85f5f339
commit 0fe54b895a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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