From 45e79dcbbf01cc6e9e93fd49168c65dc7ab17b91 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 11 Mar 2015 23:53:08 +0100 Subject: [PATCH] normalize dependant hitpoints after repairing --- addons/repair/functions/fnc_setDamage.sqf | 3 +++ addons/repair/functions/fnc_setHitPointDamage.sqf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/addons/repair/functions/fnc_setDamage.sqf b/addons/repair/functions/fnc_setDamage.sqf index acd627d898..24e38ae5b2 100644 --- a/addons/repair/functions/fnc_setDamage.sqf +++ b/addons/repair/functions/fnc_setDamage.sqf @@ -38,3 +38,6 @@ _vehicle setDamage _damage; { _vehicle setHitPointDamage [_x, _hitPointDamages select _forEachIndex]; } forEach _hitPoints; + +// normalize hitpoints +[_vehicle] call FUNC(normalizeHitPoints); diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index 2d38131a11..8b6b4204e6 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -74,3 +74,6 @@ _vehicle setDamage _damageNew; { _vehicle setHitPointDamage [_x, _hitPointDamages select _forEachIndex]; } forEach _hitPoints; + +// normalize hitpoints +[_vehicle] call FUNC(normalizeHitPoints);