mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
First draft of death prevention
This commit is contained in:
parent
a609d00730
commit
fba44f490d
@ -56,8 +56,18 @@ if (_damageReturn < 0.01) exitWith {0};
|
||||
if (GVAR(level) >= 1) then {
|
||||
_damageReturn = (_this + [_damageReturn, _typeOfDamage]) call FUNC(handleDamage_medium);
|
||||
if (GVAR(level) >= 2) then {
|
||||
_damageReturn = (_this + [_damageReturn, _typeOfDamage]) call FUNC(handleDamage_advanced);
|
||||
};
|
||||
_damageReturn = (_this + [_damageReturn, _typeOfDamage]) call FUNC(handleDamage_advanced);
|
||||
};
|
||||
};
|
||||
|
||||
if (_unit getVariable [QGVAR(preventDeath), false] and
|
||||
{_damageReturn >= 0.9} and
|
||||
{_selection in ["", "head", "body"]}) exitWith {
|
||||
if (vehicle _unit != _unit and {damage _vehicle >= 1}) then {
|
||||
// @todo
|
||||
// [_unit] call FUNC(unload);
|
||||
};
|
||||
0.89
|
||||
};
|
||||
|
||||
_damageReturn
|
||||
|
@ -43,6 +43,7 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo), -3]) + 2) then {
|
||||
_unit setVariable [QGVAR(hitPoints), []];
|
||||
_unit setVariable [QGVAR(damages), []];
|
||||
_unit setVariable [QGVAR(structDamage), 0];
|
||||
_unit setVariable [QGVAR(preventDeath), false];
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user