From 9552ceea9ecc9899e8abbc300989c540fd5c6a3d Mon Sep 17 00:00:00 2001 From: icomrade Date: Thu, 28 Jul 2016 12:54:30 -0400 Subject: [PATCH] Require part to be damaged to be removed see comments @ 3292d84b857f307571af9233dcfffe9d59a0b5e9 --- SQF/dayz_code/actions/salvage.sqf | 2 +- SQF/dayz_code/actions/salvage_vehicle.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/salvage.sqf b/SQF/dayz_code/actions/salvage.sqf index aacea6afb..49087bd97 100644 --- a/SQF/dayz_code/actions/salvage.sqf +++ b/SQF/dayz_code/actions/salvage.sqf @@ -47,7 +47,7 @@ if (_hasToolbox) then { //Remove melee magazines (BIS_fnc_invAdd fix) {player removeMagazines _x} count MeleeMagazines; _damage = [_vehicle,_hitpoint] call object_getHit; - if (_damage < 1) then { + if (_damage < 1 && {_damage > 0}) then { _BreakableParts = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"]; if (_hitpoint in _BreakableParts) then { if ((random 1) < (_damage * 0.9)) then { //max 90% chance to break diff --git a/SQF/dayz_code/actions/salvage_vehicle.sqf b/SQF/dayz_code/actions/salvage_vehicle.sqf index c78d89853..7c8406d8e 100644 --- a/SQF/dayz_code/actions/salvage_vehicle.sqf +++ b/SQF/dayz_code/actions/salvage_vehicle.sqf @@ -57,7 +57,7 @@ if (_is6WheelType) then { //get every damaged part no matter how tiny damage is! _damagePercent = str(round(_damage * 100))+"% Damage"; - if (_damage < 1) then { + if (_damage < 1 && {_damage > 0}) then { if ((_damage >= 0) and (_damage <= 0.25)) then {_color = "color='#00ff00'";}; //green if ((_damage >= 0.26) and (_damage <= 0.50)) then {_color = "color='#ffff00'";}; //yellow if ((_damage >= 0.51) and (_damage <= 0.75)) then {_color = "color='#ff8800'";}; //orange