mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1692 from acemod/fixVanillaDamageEffectsShowing
Fix vanilla damage effects
This commit is contained in:
commit
07303633e4
@ -80,10 +80,10 @@ if (GVAR(level) < 2) then {
|
|||||||
} else {
|
} else {
|
||||||
_damageReturn = _damageReturn min 0.89;
|
_damageReturn = _damageReturn min 0.89;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
[_unit] call FUNC(addToInjuredCollection);
|
[_unit] call FUNC(addToInjuredCollection);
|
||||||
|
|
||||||
|
|
||||||
if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith {
|
if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith {
|
||||||
if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then {
|
if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then {
|
||||||
[_unit] call EFUNC(common,unloadPerson);
|
[_unit] call EFUNC(common,unloadPerson);
|
||||||
@ -99,7 +99,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
|
|||||||
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith {
|
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith {
|
||||||
if (_unit getvariable ["ACE_isUnconscious", false]) exitwith {
|
if (_unit getvariable ["ACE_isUnconscious", false]) exitwith {
|
||||||
[_unit] call FUNC(setDead);
|
[_unit] call FUNC(setDead);
|
||||||
0.89
|
0.89;
|
||||||
};
|
};
|
||||||
if (_delayedUnconsicous) then {
|
if (_delayedUnconsicous) then {
|
||||||
[{
|
[{
|
||||||
@ -110,9 +110,9 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
|
|||||||
[_this select 0, true] call FUNC(setUnconscious);
|
[_this select 0, true] call FUNC(setUnconscious);
|
||||||
}, [_unit]] call EFUNC(common,execNextFrame);
|
}, [_unit]] call EFUNC(common,execNextFrame);
|
||||||
};
|
};
|
||||||
0.89
|
0.89;
|
||||||
};
|
};
|
||||||
_damageReturn min 0.89;
|
0.89;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {
|
if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {
|
||||||
@ -120,8 +120,7 @@ if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_dam
|
|||||||
[_unit] call EFUNC(common,unloadPerson);
|
[_unit] call EFUNC(common,unloadPerson);
|
||||||
};
|
};
|
||||||
[_unit] call FUNC(setDead);
|
[_unit] call FUNC(setDead);
|
||||||
|
0.89;
|
||||||
0.89
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_damageReturn
|
_damageReturn;
|
||||||
|
@ -39,8 +39,6 @@ _damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
|||||||
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
|
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
|
||||||
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
_unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||||
|
|
||||||
[_unit] call FUNC(handleDamage_advancedSetDamage);
|
|
||||||
|
|
||||||
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
|
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
|
||||||
[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_assignWounds);
|
[_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;
|
_args = _this select 0;
|
||||||
|
|
||||||
if (diag_frameno > (_args select 1) + 2) then {
|
if (diag_frameno > (_args select 1) + 2) then {
|
||||||
|
(_args select 0) setDamage 0;
|
||||||
|
|
||||||
_cache_params = (_args select 0) getVariable [QGVAR(cachedHandleDamageParams), []];
|
_cache_params = (_args select 0) getVariable [QGVAR(cachedHandleDamageParams), []];
|
||||||
_cache_damages = (_args select 0) getVariable QGVAR(cachedDamages);
|
_cache_damages = (_args select 0) getVariable QGVAR(cachedDamages);
|
||||||
{
|
{
|
||||||
_params = _x + [_cache_damages select _foreachIndex];
|
_params = _x + [_cache_damages select _foreachIndex];
|
||||||
_params call FUNC(handleDamage_advanced);
|
_params call FUNC(handleDamage_advanced);
|
||||||
}foreach _cache_params;
|
}foreach _cache_params;
|
||||||
|
|
||||||
|
[(_args select 0)] call FUNC(handleDamage_advancedSetDamage);
|
||||||
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
}, 0, [_unit, diag_frameno] ] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_unit, diag_frameno] ] call CBA_fnc_addPerFrameHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user