diff --git a/SQF/dayz_code/actions/object_pickup.sqf b/SQF/dayz_code/actions/object_pickup.sqf index 09849ebad..e7a8b796f 100644 --- a/SQF/dayz_code/actions/object_pickup.sqf +++ b/SQF/dayz_code/actions/object_pickup.sqf @@ -37,6 +37,9 @@ _claimedBy = _holder getVariable["claimed","0"]; if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]}; +// test to see if item still exists just before adding and removing +if(isNull _holder) exitWith { sleep 1; DZE_CanPickup = true; }; + if(_classname isKindOf "Bag_Base_EP1") then { _PlayerNear = _holder call dze_isnearest_player; @@ -46,9 +49,6 @@ if(_classname isKindOf "Bag_Base_EP1") then { player action ["TakeBag", _holder]; }; -// test to see if item still exists just before adding and removing -if(isNull _holder) exitWith { sleep 1; DZE_CanPickup = true; }; - _obj = nearestObjects [(getPosATL player), [(typeOf _holder)], 5]; _qty = count _obj;