From 18900cb82c3121ff90a5e96554ca35691bebf83a Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 4 Apr 2015 16:27:44 +0200 Subject: [PATCH] fixed revive for basic --- addons/medical/functions/fnc_handleDamage.sqf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index a515505052..7cba3485e7 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -44,7 +44,7 @@ if (GVAR(level) >= 2) then { if !([_unit] call FUNC(hasMedicalEnabled)) exitwith { // Because of the config changes, we cannot properly disable the medical system for a unit. // lets use basic for the time being.. - _this call FUNC(handleDamage_basic); + _damageReturn = _this call FUNC(handleDamage_basic); }; [_unit, _selection, _damage, _source, _projectile] call FUNC(handleDamage_caching); @@ -60,7 +60,7 @@ if (GVAR(level) >= 2) then { _newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selection))); }; - if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then { + if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)} && {_selection in ["", "head", "body"]}) then { if ([_unit] call FUNC(setDead)) then { _damageReturn = 1; } else { @@ -73,11 +73,13 @@ if (GVAR(level) >= 2) then { }; [_unit] call FUNC(addToInjuredCollection); -if (_unit getVariable [QGVAR(preventDeath), GVAR(preventInstaDeath)] && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith { +if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith { if (vehicle _unit != _unit and {damage _vehicle >= 1}) then { // @todo // [_unit] call FUNC(unload); }; + [_unit] call FUNC(setDead); + 0.89 };