mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added force unconscious parameter #1205
This commit is contained in:
parent
6439bf4e3a
commit
913c938a9d
@ -17,10 +17,11 @@
|
||||
|
||||
#define DEFAULT_DELAY (round(random(10)+5))
|
||||
|
||||
private ["_unit", "_set", "_animState", "_originalPos", "_startingTime","_minWaitingTime"];
|
||||
private ["_unit", "_set", "_animState", "_originalPos", "_startingTime","_minWaitingTime", "_force"];
|
||||
_unit = _this select 0;
|
||||
_set = if (count _this > 1) then {_this select 1} else {true};
|
||||
_minWaitingTime = if (count _this > 2) then {_this select 2} else {DEFAULT_DELAY};
|
||||
_force = if (count _this > 3) then {_this select 3} else {false};
|
||||
|
||||
// No change, fuck off. (why is there no xor?)
|
||||
if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {};
|
||||
@ -46,7 +47,7 @@ if (_unit == ACE_player) then {
|
||||
};
|
||||
|
||||
// if we have unconsciousness for AI disabled, we will kill the unit instead
|
||||
if !([_unit] call EFUNC(common,isPlayer)) then {
|
||||
if (!([_unit] call EFUNC(common,isPlayer)) && !_force) then {
|
||||
_enableUncon = _unit getVariable [QGVAR(enableUnconsciousnessAI), GVAR(enableUnconsciousnessAI)];
|
||||
if (_enableUncon == 0 or {_enableUncon == 1 and (random 1) < 0.5}) exitWith {
|
||||
[_unit, true] call FUNC(setDead);
|
||||
|
Loading…
Reference in New Issue
Block a user