arma2-epoch-server/@DayZ_Epoch_Server/addons/dayz_server/compile/server_setHitpoints.sqf
stuzer05 61de8f76f3 #15 Upgrade to Epoch 1.7.0.1 (#16)
Closes #15

Reviewed-on: #16
Co-authored-by: stuzer05 <stuzer05@stuzer.link>
Co-committed-by: stuzer05 <stuzer05@stuzer.link>
2023-10-01 21:22:36 +03:00

9 lines
295 B
Plaintext

local _obj = _this select 0;
local _hitpoints = _this select 1;
local _isAir = _obj isKindOf "Air";
{
local _selection = _x select 0;
local _dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
_obj setHit [_selection,_dam];
} count _hitpoints;