From f186e256cb4319a5edcf7437214aeb70660a9ae8 Mon Sep 17 00:00:00 2001 From: icomrade Date: Wed, 10 Aug 2016 13:06:20 -0400 Subject: [PATCH] Tree chopping changes Allow player to get more than 1 item out of a single tree. Using ItemLog would allow the player to get too much wood if using a hatchet so I changed it back to PartWoodPile. --- SQF/dayz_code/compile/player_harvest.sqf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/SQF/dayz_code/compile/player_harvest.sqf b/SQF/dayz_code/compile/player_harvest.sqf index 04327cda4..bc4d42929 100644 --- a/SQF/dayz_code/compile/player_harvest.sqf +++ b/SQF/dayz_code/compile/player_harvest.sqf @@ -29,15 +29,11 @@ if (_ammo isKindOf "Hatchet_Swing_Ammo" || _ammo isKindOf "Chainsaw_Swing_Ammo") // damage must be going down _damage = damage _tree; if (DZE_TEMP_treedmg < _damage) then { - - if (_damage < 0.99) then { + if (_damage < 0.99 && {(random 1) > 0.7}) then { PVDZ_objgather_Knockdown = [_tree,player]; // Ask server to setDamage on tree publicVariableServer "PVDZ_objgather_Knockdown"; }; - - //diag_log ("DAMAGE: " + str(damage _tree)); - - _itemOut = if (_ammo isKindOf "Chainsaw_Swing_Ammo") then {"PartWoodLumber"} else {"ItemLog"}; // Log can be crafted to > 2x plank > 4x woodpile + _itemOut = if (_ammo isKindOf "Chainsaw_Swing_Ammo") then {"PartWoodLumber"} else {"PartWoodPile"}; // Log can be crafted to > 2x plank > 4x woodpile _itemOut call fn_dropItem; _distance = 60; @@ -48,4 +44,4 @@ if (_ammo isKindOf "Hatchet_Swing_Ammo" || _ammo isKindOf "Chainsaw_Swing_Ammo") DZE_TEMP_treedmg = _damage; }; }; -}; \ No newline at end of file +};