From 359ee1d23b4ba9b1b392f6e7bc74d83f8ba5aeba Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 16 Aug 2015 15:31:20 -0500 Subject: [PATCH] #2180 - Fix QGVAR(fullRepairLocation) switch statement --- addons/repair/functions/fnc_canRepair.sqf | 10 +++++----- addons/repair/functions/fnc_repair.sqf | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 0254dfbe14..4a8524e518 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -79,12 +79,12 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { - case 0: {true}; - case 1: _repairVeh; - case 2: _repairFacility; - case 3: {{call _repairFacility || call _repairVeh}}; + case 0: {true}; //useAnywhere + case 1: {call _repairVeh}; //repairVehicleOnly + case 2: {call _repairFacility}; //repairFacilityOnly + case 3: {(call _repairFacility) || {call _repairVeh}}; //vehicleAndFacility + default {false}; //Disabled }; - _return = call _return; }; }; } forEach _locations; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 263e0fec23..3eb8f77ca6 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -77,12 +77,12 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { - case 0: {true}; - case 1: _repairVeh; - case 2: _repairFacility; - case 3: {{call _repairFacility || call _repairVeh}}; + case 0: {true}; //useAnywhere + case 1: {call _repairVeh}; //repairVehicleOnly + case 2: {call _repairFacility}; //repairFacilityOnly + case 3: {(call _repairFacility) || {call _repairVeh}}; //vehicleAndFacility + default {false}; //Disabled }; - _return = call _return; }; }; } forEach _locations;