From 74f5b99dd85b836cebc4c96109b07fb97f7458df Mon Sep 17 00:00:00 2001 From: Cuel Date: Mon, 16 Apr 2018 15:39:39 +0200 Subject: [PATCH] isRepairVehicle handling for bool and int --- addons/repair/functions/fnc_isRepairVehicle.sqf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index f18ff0cd3e5..abc11265542 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -20,4 +20,8 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; -((_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]) > 0); +// Backwards compability due to wiki saying isRepairVehicle was a boolean, this function only checked for an integer value. +private _value = _vehicle getVariable ["ACE_isRepairVehicle", -1]; +if (_value in [0, false]) exitWith {false}; +if (_value isEqualTo true || {value > 0}) exitWith {true}; +getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair)) > 0 // return