mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-26 17:51:51 +03:00
Fix some issues with traps
Removed two unused files. Vanilla commits:42e72463a302726fb1926a7c53ebcf1fb63089959543ea057f
This commit is contained in:
@@ -6,7 +6,6 @@ _type = _array select 0;
|
||||
_classname = _array select 1;
|
||||
_holder = _array select 2;
|
||||
|
||||
|
||||
if (player distance _holder > 3) exitwith { localize "str_pickup_limit_1","PLAIN DOWN" };
|
||||
|
||||
_playerID = getPlayerUID player;
|
||||
@@ -29,8 +28,6 @@ if (isnil "claimed") then {
|
||||
|
||||
canPickup = false;
|
||||
|
||||
if (_classname isKindOf "TrapBear") exitWith { deleteVehicle _holder; };
|
||||
|
||||
player playActionNow "PutDown";
|
||||
|
||||
//Adding random chance of arrow is re-usable on pickup
|
||||
@@ -74,6 +71,17 @@ _isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
if (_isOk) then {
|
||||
if (_holder isKindOf "TrapItems") then {
|
||||
if !(_holder getVariable ["fullRefund",true]) then {
|
||||
//Trap was already triggered, refund all parts except grenade
|
||||
player removeMagazine _classname;
|
||||
["equip_string",1,1] call fn_dropItem;
|
||||
["PartWoodPile",1,1] call fn_dropItem;
|
||||
["equip_duct_tape",1,1] call fn_dropItem;
|
||||
};
|
||||
PVDZ_obj_Destroy = [(_holder getVariable["ObjectID","0"]),(_holder getVariable["ObjectUID","0"]),player];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
};
|
||||
deleteVehicle _holder;
|
||||
} else {
|
||||
if (!_isOk) exitWith {
|
||||
|
||||
Reference in New Issue
Block a user