Require part to be damaged to be removed

see comments @ 3292d84b85
This commit is contained in:
icomrade
2016-07-28 12:54:30 -04:00
parent 82cf8e76f0
commit 9552ceea9e
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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