Skip to content

Commit

Permalink
Stop damaging undamaged tracks when fixing immobile ones
Browse files Browse the repository at this point in the history
Co-authored-by: PabstMirror <[email protected]>
  • Loading branch information
lambdatiger and PabstMirror authored Feb 26, 2025
1 parent ababe09 commit 0d4f7dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/vehicleCoasting/functions/fnc_addCoastingVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ private _freeRunLen = 20 + random 40; // Max runtime
// Simulate broken tracks running out
if (_vehicle getHitPointDamage "hitrtrack" > 0.8 ||
{_vehicle getHitPointDamage "hitltrack" > 0.8}) then {
_vehicle setHitPointDamage ["hitrtrack", 0.4, false];
_vehicle setHitPointDamage ["hitltrack", 0.4, false];
_vehicle setHitPointDamage ["hitrtrack", 0.4 min (_vehicle getHitPointDamage "hitrtrack"), false];
_vehicle setHitPointDamage ["hitltrack", 0.4 min (_vehicle getHitPointDamage "hitltrack"), false];
_freeRunLen = 1 + random 2;
};

Expand Down

0 comments on commit 0d4f7dd

Please sign in to comment.