2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* 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-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Object (Object)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Nothing.
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private ["_unit", "_respawnVariables"];
|
|
|
|
|
|
|
|
_unit = _this select 0;
|
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
_respawnVariables = _unit getVariable ["ACE_respawnVariables", []];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
// yes those
|
2015-01-12 04:02:33 +00:00
|
|
|
_respawnVariables pushBack "ACE_PersistentFunctions";
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
_unit setVariable [_x, _unit getVariable _x, true];
|
|
|
|
} forEach _respawnVariables;
|
|
|
|
|
|
|
|
// fix speaker after respawn
|
2015-01-11 18:20:14 +00:00
|
|
|
[_unit, format ["{_this setSpeaker '%1'}", speaker _unit], 2] call FUNC(execRemoteFnc);
|