add delay to Unconsciousness Captivity(posible fix for #3121)

This commit is contained in:
jokoho48 2016-01-06 17:46:59 +01:00
parent 776f9352fe
commit 6d49bbda28
5 changed files with 34 additions and 2 deletions

View File

@ -223,4 +223,11 @@ class ACE_Settings {
values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"};
isClientSettable = 1;
};
class GVAR(delayUnconCaptive) {
displayName = CSTRING(delayUnconCaptive);
typeName = "SCALAR";
value = 10;
values[] = {CSTRING(painEffect_Flash), CSTRING(painEffect_Chroma)};
};
};

View File

@ -138,6 +138,13 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
class delayUnconCaptive {
displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName);
description = CSTRING(MedicalSettings_delayUnconCaptive_Description);
typeName = "NUMBER";
defaultValue = 10;
}
};
class ModuleDescription {

View File

@ -32,3 +32,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(painCoefficient), "painCoefficient"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(keepLocalSettingsSynced), "keepLocalSettingsSynced"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(delayUnconCaptive), "delayUnconCaptive"] call EFUNC(common,readSettingFromModule);

View File

@ -94,8 +94,16 @@ _unit setUnitPos "DOWN";
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
};
// Delay Unconscious so the AI dont instant stop shooting on the unit #3121
if (GVAR(delayUnconCaptive) == 0) then {
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
} else {
[{
[_this select 0, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
},[_unit], GVAR(delayUnconCaptive)] call EFUNC(common,waitAndExecute);
};
_anim = [_unit] call EFUNC(common,getDeathAnim);
[_unit, _anim, 1, true] call EFUNC(common,doAnimation);
[{

View File

@ -3880,5 +3880,14 @@
<Portuguese>Não existe nenhum torniquete nesta parte do corpo!</Portuguese>
<Czech>Žádné škrtidlo na této části těla!</Czech>
</Key>
<Key ID="STR_ACE_Medical_delayUnconCaptive">
<English>Todo</English>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_delayUnconCaptive_Description">
<English>Todo</English>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_delayUnconCaptive_DisplayName">
<English>Todo</English>
</Key>
</Package>
</Project>