From b065aa9db35c146ccbbc1351611dd0bb86e74bf4 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Sun, 24 Nov 2013 18:45:21 -0600 Subject: [PATCH] moved above takebag --- SQF/dayz_code/actions/object_pickup.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;