mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Remove max unconsciousness time again
This commit is contained in:
parent
fd152c580b
commit
f28a806938
@ -63,10 +63,6 @@ class ACE_Settings {
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(maxUnconsciousTime) {
|
||||
typeName = "SCALAR";
|
||||
value = -1;
|
||||
};
|
||||
class GVAR(enableRevive) {
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
|
@ -113,12 +113,6 @@ class CfgVehicles {
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class maxUnconsciousTime {
|
||||
displayName = "Max. Uncon. Time";
|
||||
description = "Maximum time a unit can be unconscious before dying. Negative Values disable this.";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = -1;
|
||||
};
|
||||
class bleedingCoefficient {
|
||||
displayName = "Bleeding coefficient";
|
||||
description = "Coefficient to modify the bleeding speed";
|
||||
|
@ -31,7 +31,6 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(AIDamageThreshold), "AIDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableUnsconsiousnessAI), "enableUnsconsiousnessAI"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(preventInstaDeath), "preventInstaDeath"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(maxUnconsciousTime), "maxUnconsciousTime"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(painCoefficient), "painCoefficient"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(keepLocalSettingsSynced), "keepLocalSettingsSynced"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -25,12 +25,6 @@ _minWaitingTime = if (count _this > 2) then {_this select 2} else {DEFAULT_DELAY
|
||||
// No change, fuck off. (why is there no xor?)
|
||||
if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {};
|
||||
|
||||
// Remove maximum unconsciousness time handler
|
||||
_maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1];
|
||||
if (_maxUnconHandle > 0) then {
|
||||
[_maxUnconHandle] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if !(_set) exitwith {
|
||||
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||
};
|
||||
@ -101,16 +95,6 @@ _startingTime = time;
|
||||
|
||||
[DFUNC(unconsciousPFH), 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false, vehicle _unit isKindOf "ParachuteBase"] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// Maximum unconsciousness time
|
||||
_maxUnconTime = _unit getVariable [QGVAR(maxUnconsciousTime), GVAR(maxUnconsciousTime)];
|
||||
if (_maxUnconTime >= 0) then {
|
||||
_handle = [{
|
||||
_unit = _this select 0;
|
||||
[_unit] call FUNC(setDead);
|
||||
}, [_unit], _maxUnconTime, 0.5] call EFUNC(common,waitAndExecute);
|
||||
_unit setVariable [QGVAR(maxUnconTimeHandle), _handle];
|
||||
};
|
||||
|
||||
// unconscious can't talk
|
||||
[_unit, "isUnconscious"] call EFUNC(common,muteUnit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user