ACE3/addons/repair/XEH_postInit.sqf

21 lines
605 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;
// wheels
[QGVAR(setWheelHitPointDamage), {
params ["_object", "_hitPoint", "_damage"];
2019-05-03 15:09:16 +00:00
private _damageDisabled = !isDamageAllowed _object;
2019-05-03 15:09:16 +00:00
if (_damageDisabled) then {
_object allowDamage true;
};
_object setHitPointDamage [_hitPoint, _damage];
2019-05-03 15:09:16 +00:00
if (_damageDisabled) then {
_object allowDamage false;
};
}] call CBA_fnc_addEventHandler;