mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 18:36:29 +03:00
Replace fnc_veh_setFixServer with server_setHitpoints
This commit is contained in:
@@ -86,14 +86,10 @@ if (_outcome != "PASS") then {
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
|
||||
if (_characterID != "0" && !(_object isKindOf "Bicycle")) then {_object setVehicleLock "LOCKED";};
|
||||
_isAir = _object isKindOf "Air";
|
||||
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = _x select 1;
|
||||
_dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
[_object,_selection,_dam] call fnc_veh_setFixServer;
|
||||
} forEach _hitpoints;
|
||||
|
||||
[_object,_hitpoints] call server_setHitpoints;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
|
||||
@@ -73,15 +73,13 @@ if (_outcome != "PASS") then {
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
_object setDamage _damage;
|
||||
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = _x select 1;
|
||||
if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
|
||||
[_object,_selection,_dam] call fnc_veh_setFixServer;
|
||||
} count _array;
|
||||
[_object,_array] call server_setHitpoints;
|
||||
|
||||
_object setFuel _fuel;
|
||||
_object setvelocity [0,0,1];
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
|
||||
PVDZE_veh_Init = _object;
|
||||
|
||||
@@ -124,14 +124,9 @@ if (_outcome != "PASS") then {
|
||||
|
||||
[_weapons,_magazines,_backpacks,_object] call fn_addCargo;
|
||||
|
||||
_isAir = _object isKindOf "Air";
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
_object setHit [_selection,_dam];
|
||||
} count _newHitpoints;
|
||||
|
||||
_object setFuel _fuel;
|
||||
|
||||
[_object,_newHitpoints] call server_setHitpoints;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
|
||||
@@ -173,15 +173,10 @@ if (_outcome != "PASS") then {
|
||||
{_obj removeMagazinesTurret[_x,_turret];} count _mags;
|
||||
} forEach _weaponArray;
|
||||
};
|
||||
|
||||
_isAir = _object isKindOf "Air";
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
_object setHit [_selection,_dam];
|
||||
} count _newHitpoints;
|
||||
|
||||
|
||||
_object setFuel _fuel;
|
||||
|
||||
[_object,_newHitpoints] call server_setHitpoints;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
|
||||
9
SQF/dayz_server/compile/server_setHitpoints.sqf
Normal file
9
SQF/dayz_server/compile/server_setHitpoints.sqf
Normal file
@@ -0,0 +1,9 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user