mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
[WIP] Various handleDamage_caching fixes
This commit is contained in:
parent
0f6c93852c
commit
9336e7c9e1
@ -53,7 +53,8 @@ if (GVAR(level) < 2) then {
|
||||
};
|
||||
_newDamage = _this call FUNC(handleDamage_caching);
|
||||
_typeOfDamage = [_projectile] call FUNC(getTypeOfDamage);
|
||||
|
||||
systemChat _typeOfDamage;
|
||||
|
||||
_typeIndex = (GVAR(allAvailableDamageTypes) find _typeOfDamage);
|
||||
_minLethalDamage = 0.01;
|
||||
if (_typeIndex >= 0) then {
|
||||
|
@ -47,10 +47,8 @@ _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
|
||||
[_unit] call FUNC(handleDamage_advancedSetDamage);
|
||||
|
||||
if (_typeOfProjectile == "" && {_unit getVariable [QGVAR(isFalling), false]}) then {
|
||||
_typeOfProjectile = "falling";
|
||||
};
|
||||
_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
|
||||
systemChat _typeOfDamage;
|
||||
[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds);
|
||||
|
||||
// TODO Disabled until implemented fully
|
||||
|
@ -41,17 +41,24 @@ if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isN
|
||||
if (GVAR(enableVehicleCrashes)) then {
|
||||
_selectionName = _hitSelections select (floor(random(count _hitSelections)));
|
||||
_projectile = "vehiclecrash";
|
||||
_this set [4, "vehiclecrash"];
|
||||
};
|
||||
};
|
||||
|
||||
// From AGM medical:
|
||||
// Exclude falling damage to everything other than legs; reduce structural damage.
|
||||
if (((velocity _unit) select 2 < -5) && {(vehicle _unit == _unit)}) then {
|
||||
_unit setVariable [QGVAR(isFalling), True];
|
||||
_unit setVariable [QGVAR(isFalling), true];
|
||||
_projectile = "falling";
|
||||
_this set [4, "falling"];
|
||||
};
|
||||
|
||||
if (_unit getVariable [QGVAR(isFalling), false] && {!(_selectionName in ["", "leg_l", "leg_r"])}) exitWith {0};
|
||||
if (_unit getVariable [QGVAR(isFalling), false]) then {
|
||||
if (_selectionName == "") then {
|
||||
_selectionName = ["leg_l", "leg_r"] select (floor(random 2));
|
||||
};
|
||||
_this set [1, _selectionName];
|
||||
systemChat Str(_this);
|
||||
_newDamage = _newDamage * 0.7;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user