mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Adding back break chance for wheels on salvaging
In Epoch 1.0.5.1 wheels could break on salvaging. This was unintentionally removed with Epoch 1.0.6. Thx @Seelenapperat
This commit is contained in:
@@ -34,7 +34,7 @@ if (_hasToolbox) then {
|
||||
_hits = [_vehicle,_hitpoint] call object_getHit;
|
||||
_damage = _hits select 0;
|
||||
if (_damage < 1 && {_damage > 0}) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal
|
||||
_BreakableParts = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"];
|
||||
_BreakableParts = ["HitLFWheel","HitRFWheel","HitLBWheel","HitRBWheel","HitLF2Wheel","HitRF2Wheel","HitLMWheel","HitRMWheel","HitLFWheel","HitRFWheel","HitLBWheel","HitRBWheel","HitLF2Wheel","HitRF2Wheel","HitLMWheel","HitRMWheel","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
|
||||
_isOK = true;
|
||||
|
||||
Reference in New Issue
Block a user