2015-01-16 23:21:47 +00:00
|
|
|
/**
|
|
|
|
* fn_resetAllDefaults_f.sqf
|
|
|
|
* @Descr: reset all variables that have been defined
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
private ["_unit","_oldUnit","_sets"];
|
2015-01-17 12:54:44 +00:00
|
|
|
_unit = _this select 0;
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-01-21 14:52:11 +00:00
|
|
|
_unit setvariable ["ACE_isDead",nil,true];
|
2015-01-17 13:13:37 +00:00
|
|
|
_unit setvariable ["ACE_isUnconscious", nil, true];
|
2015-01-16 23:21:47 +00:00
|
|
|
|
|
|
|
if (isPlayer _unit) then {
|
2015-02-14 19:29:07 +00:00
|
|
|
[true] call FUNC(setVolume);
|
|
|
|
[false] call FUNC(disableKeyInput);
|
|
|
|
if (["ace_medical"] call FUNC(isModLoader)) then {
|
2015-01-24 16:18:38 +00:00
|
|
|
[false] call EFUNC(medical,effectBlackOut);
|
|
|
|
};
|
2015-01-17 12:54:44 +00:00
|
|
|
|
2015-02-14 19:29:07 +00:00
|
|
|
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
2015-01-18 19:09:19 +00:00
|
|
|
// clear all disable user input
|
|
|
|
{
|
|
|
|
[_X, false] call FUNC(setDisableUserInputStatus);
|
2015-02-14 19:29:07 +00:00
|
|
|
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION);
|
2015-01-18 19:09:19 +00:00
|
|
|
};
|
2015-01-16 23:21:47 +00:00
|
|
|
};
|
2015-01-17 12:54:44 +00:00
|
|
|
|
|
|
|
{
|
2015-01-18 19:09:19 +00:00
|
|
|
if (!(_x select 4)) then {
|
|
|
|
_unit setvariable [(_x select 0),nil,_x select 3];
|
|
|
|
};
|
2015-01-17 12:54:44 +00:00
|
|
|
}foreach ([_unit] call FUNC(getAllDefinedSetVariables));
|
|
|
|
|