ACE3/addons/common/functions/fnc_restoreVariablesJIP.sqf

28 lines
549 B
Plaintext
Raw Normal View History

/*
* Author: commy2
2015-01-11 18:20:14 +00:00
* Called from respawn eventhandler. Resets all public object namespace variables that are added via FUNC(setVariableJIP).
*
2015-09-19 17:40:56 +00:00
* Arguments:
* 0: Object <OBJECT>
*
2015-09-19 17:40:56 +00:00
* Return Value:
* None
*
* Public: No
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-09-19 17:40:56 +00:00
params ["_unit"];
2015-09-19 17:40:56 +00:00
private "_respawnVariables";
_respawnVariables = _unit getVariable ["ACE_respawnVariables", []];
// yes those
_respawnVariables pushBack "ACE_PersistentFunctions";
{
2015-05-14 18:06:06 +00:00
_unit setVariable [_x, _unit getVariable _x, true];
2015-09-19 17:40:56 +00:00
false
} count _respawnVariables;
nil