2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-09-20 16:28:43 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* reset all variables that have been defined
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-20 16:28:43 +00:00
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* 0: Unit <OBJECT>
|
2015-09-20 16:28:43 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* ? <UNKNOWN>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob] call ace_common_fnc_resetAllDefaults
|
2015-09-20 16:28:43 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-20 16:28:43 +00:00
|
|
|
params ["_unit"];
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-11-30 16:27:09 +00:00
|
|
|
_unit setVariable ["ACE_isDead", nil, true];
|
|
|
|
_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);
|
2015-01-17 12:54:44 +00:00
|
|
|
|
2020-02-11 22:42:08 +00:00
|
|
|
if (!isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
2015-01-18 19:09:19 +00:00
|
|
|
// clear all disable user input
|
|
|
|
{
|
2015-05-14 22:12:40 +00:00
|
|
|
[_x, false] call FUNC(setDisableUserInputStatus);
|
2024-04-04 11:15:26 +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-09-20 16:28:43 +00:00
|
|
|
if !(_x select 4) then {
|
2015-11-30 16:27:09 +00:00
|
|
|
_unit setVariable [_x select 0, nil, _x select 3];
|
2015-01-18 19:09:19 +00:00
|
|
|
};
|
2024-04-04 11:15:26 +00:00
|
|
|
} forEach ([_unit] call FUNC(getAllDefinedSetVariables));
|