remove ccp issue in settings

prevent setCaptive if unit is wake up
This commit is contained in:
jokoho48 2016-01-06 18:01:24 +01:00
parent 6d49bbda28
commit daf2fc2669
2 changed files with 4 additions and 2 deletions

View File

@ -228,6 +228,5 @@ class ACE_Settings {
displayName = CSTRING(delayUnconCaptive);
typeName = "SCALAR";
value = 10;
values[] = {CSTRING(painEffect_Flash), CSTRING(painEffect_Chroma)};
};
};

View File

@ -99,7 +99,10 @@ if (GVAR(delayUnconCaptive) == 0) then {
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
} else {
[{
[_this select 0, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
params ["_unit"];
if (_unit getVariable ["ACE_isUnconscious", false]) then {
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
};
},[_unit], GVAR(delayUnconCaptive)] call EFUNC(common,waitAndExecute);
};