Merge pull request #3124 from acemod/delayUnconCaptiv

add delay to Unconsciousness Captivity
This commit is contained in:
Nicolás Badano 2016-02-25 09:54:27 -03:00
commit ae2ce0eebc
4 changed files with 27 additions and 1 deletions

View File

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

View File

@ -33,3 +33,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,18 @@ _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, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
} else {
[{
params ["_unit"];
if (_unit getVariable ["ACE_isUnconscious", false]) then {
[_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
};
},[_unit], GVAR(delayUnconCaptive)] call EFUNC(common,waitAndExecute);
};
[_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
_anim = [_unit] call EFUNC(common,getDeathAnim);
[_unit, _anim, 1, true] call EFUNC(common,doAnimation);
[{

View File

@ -4059,5 +4059,14 @@
<Polish>Czy pojazdy ma być pojazdem medycznym?</Polish>
<Italian>L'oggetto in questione sarà un veicolo medico o meno.</Italian>
</Key>
<Key ID="STR_ACE_Medical_delayUnconCaptive">
<English>Delay Medical Unconscious Captivity</English>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_delayUnconCaptive_Description">
<English>Delay Medical Unconscious Captivity</English>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_delayUnconCaptive_DisplayName">
<English>Delay Medical Unconscious Captivity</English>
</Key>
</Package>
</Project>