mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Made fix properly for advanced medical
This commit is contained in:
parent
300a33ea0a
commit
5887c59c05
@ -84,8 +84,6 @@ if (GVAR(level) < 2) then {
|
||||
};
|
||||
[_unit] call FUNC(addToInjuredCollection);
|
||||
|
||||
_unit setHit [_selection, _damageReturn];
|
||||
|
||||
if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith {
|
||||
if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then {
|
||||
[_unit] call EFUNC(common,unloadPerson);
|
||||
@ -100,8 +98,8 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
|
||||
|
||||
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith {
|
||||
if (_unit getvariable ["ACE_isUnconscious", false]) exitwith {
|
||||
if ([_unit] call FUNC(setDead)) exitwith {1};
|
||||
0;
|
||||
[_unit] call FUNC(setDead);
|
||||
0.89;
|
||||
};
|
||||
if (_delayedUnconsicous) then {
|
||||
[{
|
||||
@ -112,9 +110,9 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
|
||||
[_this select 0, true] call FUNC(setUnconscious);
|
||||
}, [_unit]] call EFUNC(common,execNextFrame);
|
||||
};
|
||||
0;
|
||||
0.89;
|
||||
};
|
||||
0;
|
||||
0.89;
|
||||
};
|
||||
|
||||
if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {
|
||||
@ -122,10 +120,7 @@ if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_dam
|
||||
[_unit] call EFUNC(common,unloadPerson);
|
||||
};
|
||||
[_unit] call FUNC(setDead);
|
||||
0;
|
||||
0.89;
|
||||
};
|
||||
|
||||
if (_damageReturn < 1) exitwith {
|
||||
0;
|
||||
};
|
||||
1;
|
||||
_damageReturn;
|
||||
|
@ -39,8 +39,6 @@ _damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
|
||||
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
|
||||
[_unit] call FUNC(handleDamage_advancedSetDamage);
|
||||
|
||||
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
|
||||
[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_assignWounds);
|
||||
|
||||
|
@ -81,12 +81,17 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t
|
||||
_args = _this select 0;
|
||||
|
||||
if (diag_frameno > (_args select 1) + 2) then {
|
||||
(_args select 0) setDamage 0;
|
||||
|
||||
_cache_params = (_args select 0) getVariable [QGVAR(cachedHandleDamageParams), []];
|
||||
_cache_damages = (_args select 0) getVariable QGVAR(cachedDamages);
|
||||
{
|
||||
_params = _x + [_cache_damages select _foreachIndex];
|
||||
_params call FUNC(handleDamage_advanced);
|
||||
}foreach _cache_params;
|
||||
|
||||
[(_args select 0)] call FUNC(handleDamage_advancedSetDamage);
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, [_unit, diag_frameno] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user